Jump to content
House Price Crash Forum

Are You Sure You Want To Leave This Page?

Recommended Posts

I've been seeing this message when clicking links within this site, or when moving away from it:

Are you sure you want to leave this webpage?

Message from webpage


This then offers the option to leave the page, or stay.

Problem started around April this year.

It only affects Internet Explorer 11, not Chrome and not Edge, all on Windows 10.

I started looking into it wondering whether my computer had been compromised in some way..

It's definitely this site, but it isn't necessarily an issue with this site.

I suspect it's an issue with one of two things:

1. A bug in the forum software

2. Faulty coding in one of the banner ad websites that serves ads on here

My bet would be on (2). It might cause the caching of a badly coded JavaScript file which is referenced by multiple websites, which explains why the problem then begins to "leak" to other sites, too. It seems to start with HPC.

If I delete the temporary files, all is well everywhere, until I visit this site, which triggers it again. At the moment I only see it on this site, every single time I click a link I have to dismiss the pop-up warning.

These people have also had this issue (just found this forum by searching)


It is not a security issue, it's just a bug. It could be deliberately malicious - one of the advertisers on a network has included that code - but even so, it does no damage. It's just intensely annoying.

That's as far as my investigation has got. If I had more time I'd run the site through the browser debugger and see if I can isolate precisely what is doing this.

Using Chrome and Edge aren't options for me, it has to be IE11 which is still widely used.

If anyone gets a few spare hours.. ;)

Share this post

Link to post
Share on other sites

Don't worry.... Have a look here :- http://superuser.com/questions/639084/malicious-confirm-navigation-dialogs

Despite what some of these dialogs say, they can't do anything malicious. You can always click OK or Leave Page to close offending page without any consequences.
If the dialog is too long and buttons are off the screen, you can press Enter to confirm closing the page.
If you don't have a keyboard (touchscreen devices), use the bookmarklet below or see SimpleSimon's answer (Chrome only).
Now, some details.
There's only one way to perform some action when a page is closing: through the onbeforeunload event. Of course this could be easily used against the user (for example when he tries to close a page, it opens its copy in a new window), so it's very limited.
Actually the only reasonable thing you can do is open a dialog with custom text and two buttons, one to leave the page and one to stay. Only thing a page can do with that dialog is define its text. Buttons and titlebar are immutable. Here's a screenshot from Firefox 3.6: (very old version of Firefox)

Share this post

Link to post
Share on other sites

It's not malicious, but it's very irritating. I had to click "Leave" three times (three dialog boxes, one after another) just view this topic.

Seems to be a solution here:


Requires the site developers to either remove all the banner ads/complain to/change the advertiser network so that users' machines stop being infested with this issue, or, add a line or two of code to the website to disable the unload event assuming it isn't needed for anything else.

I'm getting it on The Guardian website now, but only since coming to this site after clearing the internet history. It does seem to be this site (or the ads specific to this site) which trigger it, but it may not be specific to this site.

Share this post

Link to post
Share on other sites

It's definitely the banner ad network that is breaking the website.

Have blocked googlesyndication.com, googleadservices.com and doubleclick.net on our router.

Clear temporary files, problem gone.

Unfortunately it then takes the site exactly 20 seconds to load some pages while something in the site coding waits for the request to the ad network to timeout, and other sites which still use table-based layouts struggle because the browser wants to know the dimensions of the missing content before it will render the page, so it has to wait for the request timeout before anything appears.

I realise the bug isn't in the HPC code and this will affect other sites too; one of those ad networks needs pulling until it is fixed, and given the problem has gone on for nearly two months, it doesn't look like the ad network cares very much about what its advertisers do or the merry hell it causes to the sites they advertise on.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • The Prime Minister stated that there were three Brexit options available to the UK:   296 members have voted

    1. 1. Which of the Prime Minister's options would you choose?

      • Leave with the negotiated deal
      • Remain
      • Leave with no deal

    Please sign in or register to vote in this poll. View topic


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.