amplesdk
amplesdk copied to clipboard
Synchronous XMLHttpRequest on the main thread is deprecated.
My new upgrade to Chrome this morning threw a warning: "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/."
This is because https://github.com/clientside/amplesdk/blob/bf07c65f3c14fe000642e6feb1e4cd08c3975f19/ample/runtime/browser.js#L873 uses a synchronous XmlHttpRequest (by passing false as the third parameter).
I tend to agree with whatwg here. Synchronous HTTP requests cause the whole API to freeze for longer than necessary.
If we want to ensure that things are done before other things, I'd recommend using the waterfall function from the async library instead: https://github.com/caolan/async
@h6w, what version of chrome did you update to? I can imagine google choses to break web, so we might need to land a patch in Ample SDK
@ilinsky Chromium Version 40.0.2214.111 Ubuntu 14.10