I am trying to debug a page in Chrome. Every few seconds the page issues AJAX requests that update elements on the page. Is there a DevTools option to stop these page requests? It makes debugging HTML/CSS difficult since the DOM is reset.
Request blocking in Chrome or FirefoxOpen the devtools panel. Locate the request you wish to block. Right-click on the request. Select one of the options, "Block request URL" or "Block request Domain" - domain option only available in Chrome.
Ajax is supported in all modern browsers. We suggest using the following browsers: Google Chrome. Mozilla Firefox.
It's a little harsh, but you could override the XMLHttpRequest's call method, then it won't do anything
XMLHttpRequest.prototype.call = function () {};
Type that statement into the console panel of the page your debugging. A page refresh will reset the native functionality.
Open Chrome DevTools. Make a breakpoint in the line that you think it will be run before AJAX requests. Javascript will stop running until you press 'resume' button. Ps: you will see the page's original style. But it's still hard to change html or css in console. So this may not be the best answer!
On dev tools:
Three vertical dots icon >> Network conditions >> Offline present
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With