Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental……


Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

F12 c onsole.log顯示上面的警告;

警告引起原因,是因為在使用<script ……></script>這種方式引入的js 中使用了ajax .

而一般來講,在這種情況下,async 應該設置為true 而不是flase.

Google 了好多解決,這算是個總結吧。

參考:https://stackoverflow.com/questions/24639335/javascript-console-log-causes-error-synchronous-xmlhttprequest-on-the-main-thr

 

文章來源:劉俊濤的博客

地址:http://www.cnblogs.com/lovebing


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM