Internet Explorer Add-on for Ajax Call Detection

Using the IWebBrowser2 interface is pretty easy to know when the navigation (OnBeforeNavigate) and the completion (OnDocumentComplete) were performed. However, most of the work in browsers is done through Ajax calls (which use XMLHttpRequest).

Is there a way to subscribe to event tracking when an Ajax call has occurred and ended in IE?

+6
source share
2 answers

The official way is to create a change log using IHTMLChangeSink . It is not difficult, but it is a little tedious to implement so that you do not lose any requests.

I think the best way to do this could be to create an HTTP proxy , then use InternetSetOption to set the proxy (note that the first NULL argument to set for the current process) to your local HTTP proxy.

+3
source

This previous question seems to give an answer:

Monitoring ajax calls from IE BHO

Basically, you say that you need to embed JavaScript on each page in order to handle onreadystatechange .

+1
source

Source: https://habr.com/ru/post/943627/


All Articles