javascript - In Chrome DevTools How to prevent script from executing -


i have page not on server, particular running during page-loading

...other stuff... <script src="http://someserver.com/script.js"></script> ...other stuff... 

and causing problems.
need debug first i'd prevent script loading.

how can this? i've found can delete, edit or add script after page has loaded. not need. need load whole page skip loading script.

there couple of approaches this... first being old school way of handling ad blocking (which similar to), create dns entry in hosts file (c:\windows\system32\drivers\etc\hosts on windows) , alias someserver.com localhost 127.0.0.1:

someserver.com  127.0.0.1 

this, however, has unfortunate side-effect of not loading someserver.com.

another option use adblock plus, , add script "add own filters" tab, syntax filter be:

http://someserver.com/script.js 

hope helps!


Comments