c# - Canceling javascript requests in IE -


does know how handle , cancel javascript requests in ie? basically, i'm interested in such functionality c# webbrowser control. goal here handle javascript/ajax requests internet , if request's url match filter cancel it. think of sort if ads blocker. solution fine because think able use somehow in project. or maybe know how other browser/wrapper? appreciate help.

if referring ajax calls depends how make call. if make call using jquery example example of how cancel here:

abort ajax requests using jquery

if make call directly using , xmlhttprequest object see abort method here:

http://msdn.microsoft.com/en-us/library/ms535874(vs.85).aspx

so call relevant kill/abort method, , handler or error callbacks have attached ajax call should never called.

if want block ajax calls in webbrowser control there seems way, it's bit messy. see later part of discussion:

http://social.msdn.microsoft.com/forums/en/winforms/thread/c7c9a6f9-9875-4d8b-8c87-81f2c423fa6a

basically can modify htmldocument concerned take out ajax calls in first place. however, seem case can't disable javascript given ie session (so not 1 in webbrowser control), it's global setting.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -