Fix: “Are you sure you want to leave this page?”

Milan Stanojevic avatar. By: Milan Stanojevic
9 minute read

Home » Fix: “Are you sure you want to leave this page?”

Sometimes, when you’re surfing the internet, you might see Are you sure you want to leave this page? message. This message usually appears if you haven’t saved your input on a certain website and in most cases works as a reminder. On the other hand, some websites use this message to advertise certain products, so today we’re going to show you how to deal with this cheap tactic.

How to fix “Are you sure you want to leave this page?” message?

Solution 1 – Disable JavaScript

If you’re constantly getting this message on a specific website, you might want to try disabling JavaScript. By disabling it, you’ll prevent the message from appearing. Since JavaScript is a core component of your browser, disabling it will make many modern websites work improperly. As a workaround, you can try to disable JavaScript before leaving a certain website and then turn it back on. To disable JavaScript in Google Chrome, do the following:

  1. Click the Menu button in the top right corner and choose Settings from the menu.
  2. When Settings tab opens, click on Show advanced settings.
  3. In the Privacy section, click the Content settings button.
  4. Now navigate to the JavaScript section and check Do not allow any site to run JavaScipt. By doing so, you’ll disable JavaScript for every website.
  5. Optional: Chrome also allows you to set exceptions for JavaScript and you can do that by clicking the Manage exceptions button.
    Now enter a website address in the field on the left and choose to allow or block JavaScript for that website.

    As you can see, this method offers control over individual websites, which is better than disabling JavaScript for all websites.

If you’re using Firefox, you can disable JavaScript by following these steps:

  1. In the address bar in Firefox enter about:config.
  2. A warning message will appear. Click I accept the risk button.
  3. In the search bar on the top enter javascript.enabled. The list of results will now change. Double click javascript.enabled to disable it. If the Value changes to false, it means that JavaScript is now disabled in Firefox.

Keep in mind that this method will disable JavaScript for all websites that you open in Firefox.

If you’re using Internet Explorer, you can disable JavaScript by following these steps:

  1. Press Windows Key + S and enter internet options. Select Internet Options from the menu.
  2. Go to Security tab and click Custom level button.
  3. Go to the Scripting section and locate Active scripting. Select Disable from the list of options. Click OK to save changes.

Solution 2 – Disable add-ons

According to users, you might be able to fix this problem in Internet Explorer by disabling add-ons. To do that, follow these steps:

  1. Press Windows Key + R.
  2. When Run dialog opens, enter iexplore –extoff.

Internet Explorer will now start with all add-ons disabled. If the Are you sure you want to leave this page message doesn’t appear again, it means that one of your add-ons is causing this issue. To determine which add-on is the problem, you need to do the following:

  1. Start Internet Explorer.
  2. Click the Tools icon in the top right corner and choose Manage add-ons.
  3. When Manage Add-ons window opens, select any add-on and click the Disable button.
  4. Restart Internet Explorer and check if the issue is resolved. If the problem still exists, repeat the same steps, but this time be sure to disable a different add-on. Repeat this process until you find the problematic add-on.

To disable add-ons in Google Chrome, do the following:

  1. Click the Menu button and choose More tools > Extensions.
  2. Extensions tab will now appear. To disable an extension, uncheck Enabled checkbox next to the name of the extension.
  3. After disabling an extension, restart the browser and check if the issue is resolved. If the issue persists, repeat the same steps and disable a different extension. Repeat this until you find the problematic extension.

If you’re using Firefox, you can disable add-ons by following these steps:

  1. Click the Menu button in the top right corner and choose Add-ons.
  2. Select Extensions from the menu on the left.
  3. A list of all installed extensions will appear. To disable an extension, click the Disable button next to it. After disabling the extension, restart Firefox and check if the issue is resolved. If the problem still persists, repeat the process again, but be sure to disable a different extension.

Few users reported issues with Smiley Central add-on in Firefox. If you use this add-on, be sure to remove it and check if that solves the issue.

Solution 3 – Reset Internet Explorer

If the previous solution didn’t fix your problem, you might be able to solve it by resetting Internet Explorer to default. To do that, follow these steps:

  1. Open Internet Options. For detailed instructions on how to do that, check Solution 1.
  2. Navigate to the Advanced tab and click the Reset button.
  3. Check Delete personal settings option and click Reset.

After resetting Internet Explorer to default, check if the issue is resolved. If you’re using a different browser, be sure to reset it and check if that solves your issue.

Solution 4 – Clear browsing history

If you’re constantly getting Are you sure you want to leave this page? message, you might be able to fix it simply by clearing your browsing history. To clear browsing history in Chrome, you need to do the following:

  1. Click the Menu button in the top right corner and choose Settings.
  2. Scroll all the way down and click on Show advanced settings.
  3. In the Privacy section, click on Clear browsing data button.
  4. Check Browsing history, Cookies and other site and plug-in data, Cached images and files, and Hosted app data. In the Obliterate the following items from section select the beginning of time. Click the Clear browsing data button to remove the selected data.
  5. After that, restart your browser and check if the issue is resolved.

If you’re using a different browser, you can clear the browsing history by following the similar steps.

Solution 5 – Disable Mixed Content/XSS filter

If you’re getting Are you sure you want to leave this page? message frequently in Internet Explorer or Microsoft Edge, you can fix it by making one small change: disable Mixed Content. This is relatively simple and you can do it by following these steps:

  1. Open Internet Options.
  2. Navigate to the Security tab and click on Custom level button.
  3. Navigate to Miscellaneous section, locate Display mixed content and select Disable. Click OK to save changes.
  4. After doing that, restart Internet Explorer and check if the problem is resolved.

Some users also suggest enabling Mixed Content in order to fix this problem. If Mixed Content is already enabled, disable it and enable it back again. Several users reported that they fixed the issue simply by disabling XSS filter. To do that, simply do the following:

  1. Repeat steps 1 and 2 from above.
  2. Now navigate to the Scripting section and locate Enable XSS filter. Choose the Disable option and click OK to save changes.

Solution 6 – Use Developer Tools

This is a simple workaround that can help with the Are you sure you want to leave this page? message. According to users, in some cases you can fix this problem in Internet Explorer simply by using Developer Tools. To fix the problem, you just need to open Developer Tools and switch to the older version of Internet Explorer. To do that, follow these steps:

  1. Open Internet Explorer and visit the website that is giving you this message.
  2. Press F12 to open Developer Tools window.
  3. In the top right corner click an icon that has number 11 next to it. Choose any number from the menu bellow.

After doing that, you’ll emulate an older version of Internet Explorer. This isn’t a permanent solution, and you’ll have to repeat this solution with every website that gives you this message.

Solution 7 – Disable beforeunlead function in Firefox

If you’re using Firefox as your default web browser, you can easily fix this problem by using this method. This message appears due to the beforeunload JavaScript function. To stop Are you sure you want to leave this page? message from appearing, you have to prevent the aforementioned function from running. To do that in Firefox, follow these steps:

  1. Open Firefox and enter about:config in the address bar.
  2. You’ll see a warning message. Click I accept the risk button.
  3. In the search field enter dom.disable_beforeunload. Locate dom.disable_beforeunload on the list and double click it. Make sure that its Value is set to True.

After performing these steps the problem should be completely resolved. It’s worth mentioning that by disabling this function you might change how certain websites work on your PC. Many websites use this function, and if you notice that some websites are acting strangely, be sure to revert this option to its original value.

Fix – “Are you sure you want to leave this page” Chrome

Solution 1 – Crash tabs in Chrome

This is another workaround that can help you with Are you sure you want to leave this page? message. We have to mention that this solution only works in Chrome, so you can’t use it in other browsers. According to users, you can avoid this message simply by crashing the tab that you want to close. To do that in Google Chrome simply enter chrome://crash in the address bar. This should crash the tab and you’ll be able to close it without any issues.

Alternatively, you can also try entering chrome://hang in the address bar. By doing so you’ll freeze the tab and all its scripts, so you should be able to close it without problems. Once again we have to mention that this is just a workaround and not a permanent solution. If this solution works for you, you’ll have to use it every time you want to close a website that gives you this message.

Solution 2 – Use custom userscript

According to users, you can fix this problem in Chrome simply by using a userscript. Before you can do that, you need to download the Tampermonkey extension for Chrome. After doing that, simply download this script and add it to Tampermonkey. After doing that, the Are you sure you want to leave this page? error message won’t appear again. We have to mention that this is an advanced solution, so if you’re a basic user and you’re not familiar with userscripts, you might want to skip this solution.

Solution 3 – Download and use Let Me Out extension

If you’re having problems with the Are you sure you want to leave this page? message, you might be able to fix them by downloading the Let Me Out extension.

Solution 4 – Update your browser

If this issue appears in Chrome or any other browser, make sure that you have the latest version installed. Sometimes your current version might contain certain bugs and that can cause this message to appear often. Checking for updates in Chrome is rather simple, and you can do it by clicking Menu button in the top right corner and choosing Help > About Google Chrome.

A new tab will now appear showing you the current version of Chrome. At the same time, Chrome will check for available updates and install them automatically. After updating the browser, check if the issue is resolved.

Solution 5 – Restart Chrome

This is another workaround that can temporarily fix this problem. According to users, you can temporarily stop this message from appearing simply by restarting Chrome. This is a rather simple solution, but keep in mind that this isn’t a permanent fix. Even if you restart Chrome, the issue will appear after a while so you’ll have to restart it again.

The Are you sure you want to leave this page? message can be rather annoying, but we hope that our solutions helped you solve it.

READ ALSO:

Discussions

Next up

7 efficient blueprint software for home design and technical drawings

Tashreef Shareef avatar. By: Tashreef Shareef
Less than a 1 minute read

A blueprint is a proposal that shows the clients how the proposed floor or design plan will look like, followed by a 3D model of […]

Continue Reading

4 Christmas tree USB flash drives to gift this season

Tashreef Shareef avatar. By: Tashreef Shareef
Less than a 1 minute read

The Christmas season is around the corner and one of the best parts about this season is the gift it brings. If you are planning […]

Continue Reading

Top 9 tools to create stunning digital ads for your marketing campaign

Tashreef Shareef avatar. By: Tashreef Shareef
2 minute read

“A picture is worth a thousand words” is a popular English idiom and the quote perfectly describes digital marketing or marketing strategies in general that […]

Continue Reading