Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronous XMLHttpRequest on the main thread is deprecated. #203

Open
h6w opened this issue Feb 12, 2015 · 2 comments
Open

Synchronous XMLHttpRequest on the main thread is deprecated. #203

h6w opened this issue Feb 12, 2015 · 2 comments

Comments

@h6w
Copy link
Contributor

h6w commented Feb 12, 2015

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

oRequest.open("GET", sUri, false);
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

@ilinsky
Copy link
Member

ilinsky commented Feb 14, 2015

@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

@h6w
Copy link
Contributor Author

h6w commented Feb 16, 2015

@ilinsky Chromium Version 40.0.2214.111 Ubuntu 14.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants