jquery has deprecated synchronous XMLHttpRequest

Source: Internet
Author: User
Tags deprecated

Like many others, my website is using jquery. When I open the developer tools, I see a warning so says that XMLHttpRequest is

Deprecated because of it detrimental effects to the end of the user ' s experience.

I went on and read part of the documentation, but it is fairly technical. Can someone explain the consequences of shifting from XMLHttpRequest to WHATWG in simple terms? It says it happened in 2012. Also, the documentation says that synchronous xmlhttprequest outside of workers was in the process of being removed from th E Web platform, when this happens, if a user agent had them in a service, does they need to modify their existing code?

To avoid this warning, does not use:

async: false

In any of your $.ajax() calls. This was the only feature of that XMLHttpRequest ' s deprecated.

async: trueThe default is, so if you never use this option at all, your code should are safe if the feature is ever really Remov Ed (It probably won ' t be--it is removed from the standards, but I'll bet browsers would continue to support it for MA NY years).

This is JQuery's warning then. I can ignore it? I don ' t use synchronous calls to the server. The perfectionist side of me doesn ' t like have warnings at all. –jordan at 19:48
@Jordan I think the warning is coming from the browser, not jQuery. It'll happen whenever you try to use synchronous AJAX. If you use JQuery, then that would only happen if you specify this option to $.ajax . –barmar in21:47

jquery has deprecated synchronous XMLHttpRequest

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.