This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

"Are you sure you want to Leave this page" message

  • 2 replies
  • 21 have this problem
  • 3 views
  • Last reply by cor-el

more options

When attempting to close a tab, I get the "Are you sure you want to leave this page" message and a OK button and a cancel button. I would like to be able to close any page without seeing this message. If I click to close a page or tab containing a page, then I would like it to close without this message appearing. Please help.

When attempting to close a tab, I get the "Are you sure you want to leave this page" message and a OK button and a cancel button. I would like to be able to close any page without seeing this message. If I click to close a page or tab containing a page, then I would like it to close without this message appearing. Please help.

All Replies (2)

more options

Without a specific example I'm speculating a bit here...

Most browsers allow pages to detect when the user is leaving the page and run a script before leaving (using the beforeunload event). It's useful in some cases, for example, where the page lets you edit something and you never saved your edit.

You might be able to block scripts from hooking into that event (I'm not sure it's possible, but there's probably a way), but you might not be able to block it in one certain circumstances, e.g., going Back versus loading another page in the same tab versus closing the tab.

more options

If you get it all the time then you may have caught malware or a Firefox extension.


Do a malware check with some malware scanning programs on the Windows computer.
You need to scan with all programs because each program detects different malware.
Make sure that you update each program to get the latest version of their databases before doing a scan.

You can also do a check for a rootkit infection with TDSSKiller.

See also: