jQuery ajax async: false causes a strange warning?
ajax, asynchronous, javascript, jquery
Solution
Is the warning just a bug or something?
No, it's not a bug. Sync requests are indeed deprecated, for the reasons stated in the message.
Can i worry about that or ignore that?
You should heed the advice and make the appropriate changes to your app (and yes, it's not as simple as just changing `async: false` to `async: true`).
Maybe this helps to understand asynchronous operations better:
- Why is my variable unaltered after I modify it inside of a function? - Asynchronous code reference
- How do I return the response from an asynchronous call?
Problem
In my JS App, i have many Ajax calls with `async: false`. I am using latest Chrome browser and in my console below warning appears recently. 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/. Now i am trying to change all `async: false` to `async: true`. But it causes a lot of error because my app needs to run with `async: false`. Is the warning just a bug or something? Can i worry about that or ignore that?