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

If javascript can no longer be disabled - how do I leave a website that asks the "are you sure you want to leave this site" pop up question without a yes choice

more options

Given that the turn off javascript option will be disabled - how do I close a page that does not allow me to leave by giving a "are you sure you want to leave" pop up question but then redirects to itself where it again asks that question perpetually?

The only way to kill a page like that sofar was to disable javascript and then close the tab. Now I will have to close the browser - and possibly loose all the tabs I have open.

I want a javascript quick switch - allowing me to easily disable javascript for any page at will. (esp for some of my older, slower netbooks)

Or at least a "FORCE CLOSE" option for malicious webpages.

Given that the turn off javascript option will be disabled - how do I close a page that does not allow me to leave by giving a "are you sure you want to leave" pop up question but then redirects to itself where it again asks that question perpetually? The only way to kill a page like that sofar was to disable javascript and then close the tab. Now I will have to close the browser - and possibly loose all the tabs I have open. I want a javascript quick switch - allowing me to easily disable javascript for any page at will. (esp for some of my older, slower netbooks) Or at least a "FORCE CLOSE" option for malicious webpages.

All Replies (4)

more options
more options

The enable JavaScript checkbox will be removed (in Firefox 23?) but I suspect the underlying preference still will be available in about:config, and it may be added to the extensions that provide a UI for advanced preferences.

If pages are abusing the "onbeforeclose" event -- which is the one that asks whether you want to leave -- hopefully someone can come up with a way to solve that globally rather than having users have to come up with a workaround in the moment.

more options

I have this problem and it's driving me crazy. Where and how, in about:config do I make the necessary changes to prevent this highly irritating message from ever appearing? I've searched the entire list of entries in about:config but found none that seemed to come anywhere near related to this "onbeforeclose" thing, the one that asks "are you sure?" whenever I try to exit many (though not all) web pages.

more options

Hi ronc2, there isn't a specific setting for this. Firefox's built-in JavaScript settings allow you to control several aspects of scripts*, but unfortunately not this one.

I previously tried to find some other options for individually turning off this event, but I couldn't find a way. Someone might be able to create an add-on to solve this problem, but it will take someone cleverer than I.


Extensions that disable scripts on a site-specific basis:

  • If you regularly visit some sites which do this, you can block JavaScript on that specific site using the YesScript extension. Unfortunately, other script-based functionality will be blocked as well.
  • YesScript does not preemptively block scripts on every site. If you have to visit a lot of random sites and want to take a paranoid approach of having scripting blocked until you see as much of the site as you can see without running scripts, then the NoScript extension would be for you. But even then it's "all or nothing".

* These include: JavaScript enabled yes/no, override right-click menu yes/no, change order of windows yes/no, move and resize windows yes/no, close windows yes/no, specific features of pop-up windows, change images yes/no, detect copy/cut/paste and modify selection yes/no.