Synchronous XMLHttpRequest on the main thread is deprecated Synchronous XMLHttpRequest on the main thread is deprecated ajax ajax

Synchronous XMLHttpRequest on the main thread is deprecated


Using jQuery to append a script tag to the document will cause it to load the script with async:false and trigger this warning.

As in:

var script = $("<script></script>");script.attr("src", player.basepath + "whatever.js");$(document.body).append(script);


You have code performing synchronous XHR/Ajax, i.e. Ajax requests that block until they are completed.

When using jQuery, you'd do so by specifying async: false in the settings object of jQuery.ajax().

The solution is to refactor any of your code doing synchronous requests, i.e. kill all instances of jQuery.ajax({async: false}) and helper functions, as well as xhr.open(..., false), include code in third-party libraries you may use. Also, since jQuery 1.7.1 is rather old by standards of the web, I'm not sure if that jQuery version still does internal sync requests in certain cases, you'll have to check for that as well and upgrade jQuery if so.