Processing
 

Prevent AJAX requests in Chrome/Firefox after initial load

11/02/2014 17:09#1

jumbopap

Member

Joined at: 9 months ago

Post: 2

Thank: 0

Thanked: 0

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.

12/02/2014 19:56Top#2

PatAtCP

Member

Joined at: 4 months ago

Post: 4

Thank: 0

Thanked: 0

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.

11/02/2014 17:29Top#3

Joined at: 4 months ago

Post: 1

Thank: 0

Thanked: 0

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!

12/09/2016 12:48Top#4

Joined at: 4 months ago

Post: 1

Thank: 0

Thanked: 0

On dev tools:

Three vertical dots icon >> Network conditions >> Offline present

Similar articles

Chrome, THREE.js: Cross-origin image load denied

5 years ago - Reply: 5 - Views: 267

Prevent Google Chrome Log XMLHttpRequest

3 years ago - Reply: 5 - Views: 276

How can I include ChromeDriver in a JAR?

3 years ago - Reply: 3 - Views: 80

Chrome geolocation not working on any site

3 years ago - Reply: 1 - Views: 43

wrong borders' width in android browser

3 years ago - Reply: 4 - Views: 205

Uncaught SyntaxError: Unexpected token < On Chrome

3 years ago - Reply: 10 - Views: 462

Flashdata not getting cleared in Codeigniter

3 years ago - Reply: 5 - Views: 57

Illegal access Javascript error in Chrome

3 years ago - Reply: 1 - Views: 51

ng-repeat not updating in Chrome

3 years ago - Reply: 1 - Views: 81

Applying border to a checkbox in Chrome

4 years ago - Reply: 2 - Views: 118

open browser plugin using access vba

3 years ago - Reply: 1 - Views: 25

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re