Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Google Chrome Log XMLHttpRequest

Is it possible to prevent Google Chrome from logging XMLHttpRequests?

I don't mean to disable the function on Console, but my code is not letting Google Chrome show the URL to the user.


[Update] I am offering a bounty to find out how to suppress messages like

XHR Loaded (controllers.js - 200 OK - 12.728999950923026ms - 103.516KB)
like image 403
MarceloMadnezz Avatar asked Feb 24 '14 14:02

MarceloMadnezz


People also ask

What is XHR in chrome Network tab?

XMLHttpRequest (XHR) is a JavaScript API to create AJAX requests. Its methods provide the ability to send network requests between the browser and a server.

How do I enable XMLHttpRequest in Chrome?

1. Open Chrome browser 2. Go to chrome://flags/#allow-sync-xhr-in-page-dismissal 3. Change the drop-down selection from “Default” or “Disabled” to “Enabled”.

Does XMLHttpRequest use https?

There is nothing special needed to open HTTPS URLs via XMLHttpRequest. As long as the certificate and request are valid, it will work.


2 Answers

You can turn this off in the Developer Console settings. Click the three dots in the upper right hand corner of the tools, go to settings and disable Log XHR requests

like image 89
Boris Avatar answered Sep 21 '22 18:09

Boris


The logging entry in chrome's console is a behavior of chrome when any HTTP request is handled, not a problem with jQuery or ajax(XMLHttpRequest), even an <img> or <link> tag could cause this issue.

Give This a try though

like image 30
Milind Anantwar Avatar answered Sep 21 '22 18:09

Milind Anantwar