본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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.

모든 댓글 (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.