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

Milan Stanojevic
by Milan Stanojevic
Windows & Software Expert
Milan has been enthusiastic about PCs ever since his childhood days, and this led him to take interest in all PC-related technologies. Before joining WindowsReport, he worked as a front-end web developer. Read more
Affiliate Disclosure
  • Are you sure you want to leave this page message in your browser can be annoying, but there’s a way to fix this problem.
  • The fastest way to fix this issue is to switch to a different web browser and check if the issue is still there.
  • One way to fix this issue is to disable certain extensions or add-ons, so you might want to try that as well.
  • To disable the Leave site dialog in Chrome you might want to check your cache and clear it if needed.
sure leave this page
Strugling with your current browser? Upgrade to a better one: OperaYou deserve a better browser ! 350 million people use Opera daily, a fully-fledged navigation experience that comes with various built-in packages, enhanced resource consumption and great design. Here's what Opera can do:

  • Easy migration: use the Opera assistant to transfer exiting data, such as bookmarks, passwords, etc.
  • Optimize resource usage: your RAM memory is used more efficiently than in other browsers
  • Enhanced privacy: free and unlimited VPN integrated
  • No ads: built-in Ad Blocker speeds up loading of pages and protects against data-mining
  • Gaming friendly: Opera GX is the first and best browser for gaming
  • Download Opera

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.

However, some websites use this message to advertise certain products, so today we’re going to show you how to deal with this cheap tactic.


Quick tip: Use Opera

For fast browsing in complete safety you need an advanced web like Opera that comes with a built-in ad blocker and free VPN.

Improve your work-flow with the integrated messenger that allows you to communicate with your friends without switching between tabs.

Opera also has the ability to organize tabs into workspaces, and thanks to the built-in ad blocker, you’ll never have to deal with pesky ads ever again.

Opera

Opera

Make the best of your online sessions, have fun and increase productivity with this quality browser!

How do I fix Are you sure you want to leave this page?

1.Disable JavaScript

1.1. Google Chrome

  1. Click the Menu button in the top right corner and choose Settings
  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 JavaScript. This will 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.
  6. Enter a website address in the field on the left and choose to allow or block JavaScript for that website.

After disabling this feature, check if the Are you sure you want to leave this page message still appears in Chrome.


1.2. Firefox

  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.


1.3. Internet Explorer

  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.

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.

However, several users reported that they fixed Are you sure you want to leave this page after disabling JavaScript.


2. Disable add-ons

2.1. Google Chrome

  1. Click the Menu button and choose Extensions from the More Tools menu.
  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.

After following these instructions Leave site popup in Chrome should be gone.


2.2. Internet Explorer

  1. Press Windows Key + R.
  2. When Run dialog opens, enter iexplore –extoff.
  3. Start Internet Explorer.
  4. Click the Tools icon in the top right corner and choose Manage add-ons.
  5. When Manage Add-ons window opens, select any add-on and click the Disable button.
  6. 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.

2.3. Firefox

  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. For issues regarding Firefox installation you can also check out our article.


3. Reset Internet Explorer

  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.

If the previous solution didn’t fix your problem, you might be able to solve it by resetting Internet Explorer to default.

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.


4. Clear browsing history

  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.
  5. In the Obliterate the following items from section select the beginning of time and click the Clear browsing data button to remove the selected data.
  6. 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.

In some instances disable Leave site dialog in Chrome by clearing the cache, so be sure to try it.


5. Disable mixed content

  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.

6. Disable XXS filter

  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.

7. Use Developer Tools

  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.

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 and switching to 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.


8. Disable before unlead function in Firefox

  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.

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.

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.

Run a System Scan to discover potential errors

Restoro Scan

Click Start Scan to find Windows issues.

Restoro Fix

Click Repair All to fix issues with Patented Technologies.

Run a PC Scan with Restoro Repair Tool to find errors causing security problems and slowdowns. After the scan is complete, the repair process will replace damaged files with fresh Windows files and components.

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.


9. Alternative solutions in Chrome

9.1. Crash tabs in Chrome

There is another workaround that can help you with Are you sure you want to leave this page? message in Chrome. You can avoid this problem simply by crashing the tab that you want to close.

All you need to do is to 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.

This is just a workaround and not a permanent solution, but it can help you with Leave site popup in Chrome.

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.


9.2. Use Tampermonkey

Tampermonkey holds a reputation of being the most popular userscript manager with over 10 million active users.

Thanks to this great extension you can have better control of your online sessions simply by managing and editing your scripts or enable or disable them with just as easily.

Rely on Tampermonkey if you want script synchronization with Chrome Sync and cloud storage.

With this extension you can get rid of the Are you sure you want to leave this page? error message. All you need to do is 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 option.


9.3. Use Let Me Out extension

The Let Me Out extension can be of real help whenever your browser displays an error message. This smart tool is able to block unnecessary pop-up messages when navigating away from a page.

One noticeable benefit is that it is created to handle especially those Javascript errors that result in messages like Are you sure you want to leave this page?.

Some other important characteristics reside in the fact that this extension is easy to use and doesn’t take up space on your hard drive. All you need to do is add it to the Chrome bar and let it do its job.

=> Download Let Me Out Extension


9.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.

Once the Chrome is updated Leave site dialog will be disabled in Chrome.


9.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 in this article we presented you with a comprehensive and complex guide to all the solutions that can help you fix it.

We’d like to hear more from you on this issue so drop us a comment in the section below.


idee restoro Still having issues? Fix them with this tool:
  1. Download this PC Repair Tool rated Great on TrustPilot.com (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

Frequently Asked Questions

This article covers:Topics: