Stopping Javascript execution on loaded page?
There is some problem code in a website I don't have source access to. Upon loading the page, something goes wrong (in my version of Win and FF at least) such that ajax calls are made repeatedly instead of just once. This quickly locks me out of firebug and pretty much everything else so that all I can do is close the tab.
What I want is a simple button that I can quickly hit to stop executing scripts... yet for all my googling and poking ab开发者_运维技巧out I can't seem to find one?? I can't set a break point in firebug as I get locked out really quick as it struggles with all the ajax calls...
Surely I'm missing something simple here?
Lyle
You can use Fiddler to hijack the JavaScript code with an autoresponder and comment out the part of code that is making all the calls so you can figure out what is going wrong.
Firebug has a "Break on Next" button. It adds a breakpoint on the next execution of a script.
You can disable Javascript
Tool -> Option -> Content -> Disable Javascript (I'm on a French version at the moment, the name should be good though)
Or use NoScript
Javascript is single threaded. This means you can't interrupt executing scripts.
See NoScript.
NoScript is a Firefox extension that lets you block the problem site from running JavaScript while still allowing other sites to work as normal - no need for you to hit a button to stop it.
精彩评论