সহায়তা খুঁজুন

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.

আরও জানুন

How can I selectively stop malicious javascript like the scripts that won't let you close a page and give you an annoying pop-up loop to nowhere?

  • 2 উত্তরসমূহ
  • 36 এই সমস্যাটি আছে
  • 1 দেখুন
  • শেষ জবাব দ্বারা disasterman

more options

Some sites place malicious javascript in their pages that blocks you from closing the page with the "X". When you attempt to do so, it launches a pop-up window (even if you have popups disabled in firefox), which typically says "Are you sure you want to navigate away from this page?" and gives you two buttons one that says "No" or "Cancel" (which, when clicked kill the popup window and return you to the page, and then when you click the "X" again, same process repeats. The other option is a "Yes" button, which they have written the code to do the same thing, resulting in your being stuck in a loop.

You then have to open a separate browser window, go to "Tools", "Options", "Content", and turn off Javascript, then return to the rogue window which you can now close, then go back and turn the Javascript back on.

SURELY with all our technology, there is a way to defeat these annoying as hell code writers that are just f***ing with us.

Some sites place malicious javascript in their pages that blocks you from closing the page with the "X". When you attempt to do so, it launches a pop-up window (even if you have popups disabled in firefox), which typically says "Are you sure you want to navigate away from this page?" and gives you two buttons one that says "No" or "Cancel" (which, when clicked kill the popup window and return you to the page, and then when you click the "X" again, same process repeats. The other option is a "Yes" button, which they have written the code to do the same thing, resulting in your being stuck in a loop. You then have to open a separate browser window, go to "Tools", "Options", "Content", and turn off Javascript, then return to the rogue window which you can now close, then go back and turn the Javascript back on. SURELY with all our technology, there is a way to defeat these annoying as hell code writers that are just f***ing with us.

All Replies (2)

more options

Firefox 4.0will have a check box to stop such alerts. In Firefox 3 you may have to use the Task Manager to close Firefox and you probably need to delete sessionstore.js in the Firefox Profile Folder or see below.


Set the pref browser.sessionstore.max_resumed_crashes to 0 on the about:config page to get the about:sessionrestore page immediately with the first restart after a crash has occurred or the Task Manager was used to close Firefox.

That will allow you to deselect the tab(s) that you do not want to reopen, but will allow to reopen the other tabs.

See:

more options

Thanks for the response. I can close the pages in question without purposely crashing firefox with Task Manager. But I have to open another window (the controls on the tool bar are disabled with the javascript hijack) and turn off javascript. Once I do that, the script is disabled and I can close just the offending window, and not have to restart firefox.

I also have a problem with the same kinds of sites executing other scripts that go back through open windows and hijack those pages, redirecting them to a new page that they weren't on, and hijacking their individual page histories and preventing them from being returned to the page they were on with a back-button blocking script that on clicking the back button, takes the window to another page, not the one it had been on.

All things considered, it looks as if firefox is now gotten big enough that the little terror geeks are writing abundant malicious code for it, and pretty much having their way with it.

Development of some types of controls are needed to prevent these rogue pages from hijacking the browser, but without the lost functionality of turning off javascript altogether, or using the PITA NoScript addon which stops at literally every script encountered.