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

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental……的更多相关文章

  1. Ajax.html:35 [Deprecation] 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

    AJAX的容易错误的地方 Ajax.html:35 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated ...

  2. jquery.js:8672 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/.

    html5谷歌流浪器报错:jquery.js:8672 Synchronous XMLHttpRequest on the main thread is deprecated because of i ...

  3. Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more jquery-1.12.4.js:10208

    ajax执行请求之后返回了数据但是不执行success()函数,原因是返回得数据类型不是ajax请求中设定的:dataType:"json",因为是一个Map<Object, ...

  4. 关于chrome控制台警告:Synchronous XMLHttpRequest on the main thread

    Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to th ...

  5. chrome警告:Synchronous XMLHttpRequest on the main thread

    警告 原因 ajax同步请求会触发此警告 分析 这段英文翻译:主线程上的同步XMLHttpRequest不受欢迎,因为它对最终用户的体验有害: ajax同步,在向后台请求的过程中,前台代码执行会停留在 ...

  6. jquery has deprecated synchronous XMLHTTPRequest

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

  7. Why NSAttributedString import html must be on main thread?

    The HTML importer should not be called from a background thread (that is, the options dictionary inc ...

  8. 13、主线程任务太多导致异常退出(The application may be doing too much work on its main thread)

    今天花费了一天的时间来解决这个bug. 这种在程序运行期间出现的问题比较棘手,如果再没有规律的话就更难解决. 还好这个bug是由规律的,也就是说在程序执行半个小时左右后就会因为此异常而导致程序退出:那 ...

  9. reloadData should be in main thread

    reloadData should be called in main thread, so if you call it in work thread, you should call it as ...

随机推荐

  1. 频繁模式挖掘中Apriori、FP-Growth和Eclat算法的实现和对比(Python实现)

    最近上数据挖掘的课程,其中学习到了频繁模式挖掘这一章,这章介绍了三种算法,Apriori.FP-Growth和Eclat算法:由于对于不同的数据来说,这三种算法的表现不同,所以我们本次就对这三种算法在 ...

  2. Oracle连接查询小结

    表TESTA,TESTB,TESTC,各有A, B两列 A B 001 10A 002 20A A B 001 10B 003 30B A B 001 10C 004 40C 连接分为两种:内连接与外 ...

  3. Ethernet,token ring,FDDI,ATM,WLAN

    局域网(Local Area Network:LAN) 通常我们常见的"LAN"就是指局域网,这是我们最常见.应用最广的一种网络.现在局域网随着整个计算机网络技术的发展和提高得到充 ...

  4. POJ 3686 The Windy's(思维+费用流好题)

    The Windy's Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 5362   Accepted: 2249 Descr ...

  5. ZOJ 3874 Permutation Graph ——分治 NTT

    发现每一块一定是按照一定的顺序的. 然后与标号无关,并且相同大小的对答案的影响相同. 然后列出递推式,上NTT+分治就可以了. 然后就可以与输入同阶处理答案了. #include <map> ...

  6. hdu5834 Magic boy Bi Luo with his excited tree 【树形dp】

    题目链接 hdu5834 题解 思路很粗犷,实现很难受 设\(f[i][0|1]\)表示向子树走回来或不回来的最大收益 设\(g[i][0|1]\)表示向父亲走走回来或不回来的最大收益 再设\(h[i ...

  7. 有关MongoDB数据库设计的问题

    问题一:是否collection越少越好,尽量把关系数据库中分表表示的关系嵌套进文档里?问题二:如果这样的话,一句SQL能搞定的复杂查询,mongodb也许要查询多次.mongodb的查询速度是否还比 ...

  8. dockerfile 镜像构建

    1.镜像的构建有手动与自动方式,这里我们介绍自动化的构建方式 ,dockerfile常用指令如下 2.构建指令build Usage: docker image build [OPTIONS] PAT ...

  9. Linux下常用的命令记录

    本文章记录我在linux系统下常用或有用的系统级命令,包括软硬件查看.修改命令,有CPU.内存.硬盘.网络.系统管理等命令.但本文不打算介绍生僻命令,也不介绍各个linux发行版下的特有命令,且以后会 ...

  10. Sql常用日期格式

    原文发布时间为:2010-09-16 -- 来源于本人的百度文章 [由搬家工具导入] SQL Server中文版的默认的日期字段datetime格式是yyyy-mm-dd Thh:mm:ss.mmm ...