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. 基于jQuery的插件

    jQuery Validation 验证框架 jQuery Form Ajax表单插件 jQuery UI插件 Easy UI

  2. "二进制" 转化为 "十六进制

    //"二进制" 转化为 "十六进制" void To_string(uint8 *dest,char * src,uint8 length) { uint8 * ...

  3. [国家集训队][bzoj2038] 小Z的袜子 [莫队]

    题面: 传送门 思路: 又是一道标准的莫队处理题目,但是这道题需要一点小改动:求个数变成了求概率 我们思考:每次某种颜色从i个增加到i+1个,符合要求的情况多了多少? 原来的总情况数是i*(i-1)/ ...

  4. 刷题总结——Genghis Khan the Conqueror (hdu4126)

    题目: Genghis Khan(成吉思汗)(1162-1227), also known by his birth name Temujin(铁木真) and temple name Taizu(元 ...

  5. $.extend(object) 和 $.fn.extend(object)

    1.jQuery.extend(object); 它是为jQuery类添加类方法,可以理解为添加静态方法.如: jQuery.extend({ min: function(a, b) { return ...

  6. H5 基本标签使用 浅析 (含video标签、input表单等)

    1. 音频标签<audio> <audio src = “./music/Alone.mp3” controls autoplay loop = “3” ></audio ...

  7. 《手把手教你学C语言》学习笔记(10)--- 程序的循环控制

    C语言程序设计中,有些代码需要重复执行很多次,循环主要有三类: 一.for循环 1.基本格式为:for(表达式1:表达式2:表达式3){ //表达式1:循环变量赋初值 //表达式2:循环变量满足的条件 ...

  8. LeetCode OJ-- Count and Say

    https://oj.leetcode.com/problems/count-and-say/ 求经过n次变换后,变成了什么. 1  11  21  1211   111221 ps. 3 变成 ‘3 ...

  9. Codeforces 615D Multipliers (数论)

    题目链接 Multipliers 题意很明确. 很显然答案可以表示成X ^ EXP % MOD 首先我们令N为输入的n个数的乘积.并且设N = (P1 ^ C1) * (P2 ^ C2) * ... ...

  10. Swift 基础部分(建议掌握OC字符串知识的翻阅)

    更新说明: Swift 目前已经发布到4.0版本了,以前写的这整个Swift学习系列的文章,有很多的不足之处,我会重新整理整个系列文章,也是相当于重新复习一遍Swift,后面系列文章的改动之处全都会做 ...