Paul Reiners
Paul Reiners

Reputation: 7886

Intercept outgoing browser HTTP requests

I have a web application. Is it possible for my app to monitor all outgoing client browser HTTP requests that originate from my app? If it is, is it possible to intercept them and cancel them at will? Is there a JQuery HTTP interceptor, in particular?

Upvotes: 1

Views: 574

Answers (1)

Will
Will

Reputation: 2880

This is possible with JQuery using ajaxSetup.beforeSend

$.ajaxSetup({
  beforeSend: function(xhr) {
      //do your stuff here
  }
});

Upvotes: 2

Related Questions