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

How do I prevent "are you sure?" pop-up when trying to exit a web page?

  • 8 replies
  • 83 have this problem
  • 2 views
  • Last reply by miffed214

more options

The "are you sure you want to leave this page?" pop up whenever I try to exit a web page is driving me crazy. There must be a way to prevent it but I've found no solution. One reply to the forum called it the "onbeforeclose" and suggested it might be eliminated in the "about:config" part of Firefox, but searching "about:config" I found no such entry. What can be done to stop this highly irritating pop up and prevent it from ever appearing again?

The "are you sure you want to leave this page?" pop up whenever I try to exit a web page is driving me crazy. There must be a way to prevent it but I've found no solution. One reply to the forum called it the "onbeforeclose" and suggested it might be eliminated in the "about:config" part of Firefox, but searching "about:config" I found no such entry. What can be done to stop this highly irritating pop up and prevent it from ever appearing again?

All Replies (8)

more options

in edit->preference->advanced untick the warn me when websites trying to redirect to reload the page.

more options

This is done via an onunload or onunbeforeunload event on the web page and can only be disabled by blocking this script

There may also be Greasemonkey or Scriptish scripts available the remove or disable these events.

more options

The pages you referred me to are fascinating, but the instructions are completely unintelligible to me. I'm 74 years old, a retired Graphics Designer, I have no knowledge of Java script or any other computer language. This irritating popup asking if I'm sure I want to leave the page is driving me nuts. If I click the red x to exit, yes by god I want to leave the page! What insane devil created this ridiculous thing, and for what purpose?

If there is a way to prevent it from ever appearing on any web page I browse, can you please show me, or direct me to, instructions in plain, easy to understand English, or direct me to a script of some kind that i can easily, with no programming knowledge, insert someplace to handle the issue?

Pardon my rant, but so far everything I've found that addresses his issue seems to assume that the question is being asked by a skilled programmer, and uses terms and language that are totally foreign to me, a simple home user. Thank you for responding, nothing personal meant here, but I have to say the tech jargon you directed me to leave me as much in the dark as before.

more options

In my Firefox browser the "warn me when..." option is located in tools>options>general>accessibility and it is already unticked, never has been. Now what? Please, if you reply, try to avoid using, or sending me to sites which employ technical jargon. I'm a 74 year old retired Graphics Designer and don't understand the technical language. Others have offered solutions, but the instructions might as well be Greek. No blame on them, they are merely trying to help, but there are still a few of us out here in the real world who don't understand the programming language (or whatever it is) and would appreciate a plain and simple solution that a even a retired graphics professional can understand.

more options

My problem is that none of the suggestions other than completely shutting off JAVA will stop the problem.

It is very annoying to go to a site and try to leave, and even try closing the browser and not be allowed to due to a running script.

The only way I have found out of it is to unplug the internet connection, and restart the computer. When I get the prompt about oops etc about not knowing what to do either go back to the site that gave me the problems or start over. I start over, then connect the internet.

I and others should not need to go though this with ransomeware such as the FBI attack that says it will unlock your system for $200. Or the numerous infomercials that also will no let me and many others go. This problem is also in Internet Explorer, and a few other browsers.

What does it take to keep these scripts from allowing people to leave a page or close the browser? Me and many more want to know, and because the problem exists I have OPERA as a backup browser as it does not get hijacked, but it does not have the ability to have the features and add ons that are available for FireFox.

more options

I Agree those things are a major problem to using a browser, and we should not be forced to click on any popups to close it, as clicking on popups is a very bad idea, as the text can say one thing and in the background do something else such as load unwanted spyware on your computer, or steal your passwords and many many more things.

HTML was easy for me to learn, and JAVA is just slightly harder. They are very easy compared to learning C++, FORTRAN, PASCAL, ADA, or any of the other popular languages. As such they are a script that does what it is told to do and shows what you want it to on the screen. All it takes is knowing where to look to find the codes.

If it helps any I have been a programmer for most of my life, and these problems (i say problems, as there is more than one way that is used to hold people from leaving). I know some about JAVA, as I have had one class and part of another on the script language.

I have tried the add ons that were posted earier on this subject, and have yet to figure out how to make those useable to me.

That is why turning off the internet connection, and turning off JAVA is the only ways out.

more options

Admittedly, this is a little complicated.

Firefox allows scripts to monitor numerous different events that occur on a page, from loading, to scrolling, to mouse movements and keyboard actions, to unloading. Firefox does not have a built-in way to block sites from monitoring and reacting to specific events, such as the user unloading the page. I also have not found any add-ons that can block specific events from being monitored.

In the following thread, a user linked to a userscript that will strip out any code in a page that responds to the unload or beforeunload event. This solves the problem, but will remove desirable functionality on some sites. For example, on some sites, when you are composing a message or post and accidentally start to leave the page, that dialog can save you from losing your work.

But if you find yourself getting ransomed more often than you're possibly losing work, the userscript may be a good temporary fix for you, until something better comes along.

how can i disable the message "leave page / stay on page"

P.S. I use NoScript, which takes the paranoid view that no site can use JavaScript until you approve it. Sometimes that takes a few tries because sites now spread their scripts out over multiple servers. On the plus side, far fewer ads. If you're paranoid, too, you can learn more about it here: http://noscript.net/

more options

I had been using another method but I found a better solution using bookmarklets.

Use the Escape bookmarklet on this page:

http://dev.jeffersonscher.com/bookmarklets.html#escape

Either drag the "escape" button to you bookmarks menu or do like I did and right-click on the "Escape" button and choose "bookmark this link"... I actually created a new folder under the "Recently bookmarked" bookmark so it would be handy.