We help IT Professionals succeed at work.

Monitor all incoming requests

Hi there,
With Javascript, i would like to have a script on my webpage, that would capture (trigger a function) all outgoing ajax requests and all incoming responses.

how can i do that?
I have jquery on my page.
Watch Question

When you use jquery, you can use .ajaxStart() for outgoing requests: http://api.jquery.com/ajaxStart/

For incoming responses you can use .ajaxComplete(): http://api.jquery.com/ajaxComplete/

You can find all global event handlers here: http://api.jquery.com/category/ajax/global-ajax-event-handlers/

Explore More ContentExplore courses, solutions, and other research materials related to this topic.