Saturday, July 15, 2017

How to clear ajax requests from network tab using jquery?

Leave a Comment

I need to clear the ajax requests from network tab using jquery on any event like button click or using time interval. Is this possible?

2 Answers

Answers 1

If you mean the network tab in the browser's dev tools, then no, you cannot control it from Javascript. The dev tools are part of the browser and not part of the webpage, so Javascript has no knowledge of them.

This isn't directly related to your question, but this is evidence that the kind of thing you're looking to do would be very much not possible:

We only allow explicit devtools opening.

https://bugs.chromium.org/p/chromium/issues/detail?id=112277

Answers 2

I think, that's not possible but you can ensure you only send data in encrypted format (like md5 or something), so that no one can decrypt it even if the see it in network tab.

Still if you want, you can try some workaround. I guess, making JSONP call should work..they are not real ajax requests as they don't use XMLHttpRequest object, and they simply inject a script tag into the DOM.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment