简体   繁体   中英

XMLHttpRequest on the main thread is deprecated

What meaning of this message:

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/ .

You may have a new message that will block any feature of my site?

Thanks

Apparently this message is displayed when using a synchronous AJAX request. Synchronous XMLHttpRequest on the main thread is deprecated

If you use a synchronous ajax request on the main thread it will block your application / webpage until the response is received.

You should use asynchronous requests with callbacks or use Worker-Threads to load the data with XMLHttpRequest. Normally the first solution is the prefered way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM