jquery has deprecated synchronous XMLHTTPRequest
Like many others, my website is using jquery. When I open the developer tools, I see a warning that says that XMLHTTPRequest is
deprecated because of its detrimental effects to the end user's experience.
I went on and read part of the documentation, but it was 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 is in the process of being removed from the web platform, when that happens, if a user agent had them in a service, do they need to modify their existing code?
To avoid this warning, do not use:
async: false
in any of your $.ajax() calls. This is the only feature of XMLHttpRequest that's deprecated.
The default is async: true, so if you never use this option at all, your code should be safe if the feature is ever really removed (it probably won't be -- it may be removed from the standards, but I'll bet browsers will continue to support it for many 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 having warnings at all. – Jordan Feb 20 at 19:48
|
|||
|
|
@Jordan I think the warning is coming from the browser, not jQuery. It will happen whenever you try to use synchronous AJAX. If you use jQuery, that will only happen if you specify that option to
$.ajax. – BarmarFeb 20 at 21:47 |
jquery has deprecated synchronous XMLHTTPRequest的更多相关文章
- 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 ...
- 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 ...
- 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 th ...
- 关于chrome控制台警告:Synchronous XMLHttpRequest on the main thread
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to th ...
- JQuery需要手动回收xmlHttpRequest对象
今天在园子里面看到kuibono的文章说JQuery不会自动回收xmlHttpRequest对象,并且在每次Ajax请求之后都会创建一个新的xmlHttpRequest对象,感到惊讶,索性写了一个程序 ...
- 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, ...
- jquery与ajax的XMLHttpRequest对象介绍
首先 认识一个对象 这个对象叫XMLHttpRequest XMLHttpRequest对象可以提供在不刷新页面的情况下向服务器发送异步请求,并且接受服务器端返回的结果.从而实现局部更新当前页面的功 ...
- chrome警告:Synchronous XMLHttpRequest on the main thread
警告 原因 ajax同步请求会触发此警告 分析 这段英文翻译:主线程上的同步XMLHttpRequest不受欢迎,因为它对最终用户的体验有害: ajax同步,在向后台请求的过程中,前台代码执行会停留在 ...
- jQuery的ajax问题
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to th ...
随机推荐
- javaScript中的一些知识
利用js动态生成table <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http ...
- grub4dos新手指南-1
对于多数没有或很少接触过linux的windows用户来说,刚开始使用grub时离不开菜单.也就是说,使用grub前,我们要准备menu.lst文件.先讲一些最为常用的命令help用来显示其它命令的用 ...
- Screen tearing
Umm, screen tearing happens when the frame rate and the monitor refresh rate don't match. When that ...
- prestashop 基本设置
不跳转 要先改这个UPDATE`ps_shop_url`SET`domain_ssl`= replace(`domain_ssl` ,'us2.try.net','www.gelchaussures. ...
- Chapter 2 Open Book——5
I was relieved that I had the desk to myself, that Edward was absent. 我能一个人一张桌子很开心,就因为Edward 没来. I t ...
- git(工作区,暂存区,管理修改,撤销修改,删除文件)
工作区和暂存区 984次阅读 Git和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念. 先来看名词解释. 工作区(Working Directory) 就是你在电脑里能看到的目录,比如我的l ...
- hdu_3555_Bomb(数位DP)
题目连接:hdu_3555_Bomb 题意:和2089一样,只是数据大了点,不过道理是一样的 #include<cstdio> #include<cstring> #defin ...
- hdu_2089_不要62(数位DP)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2089 题意:中文,不解释 题解:dp[i][j]表示当前第i位的前一个数为j,然后记忆化dfs,注意的 ...
- LeetCode OJ 292.Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, eac ...
- getReadableDatabase 和 getWritableDatabase的区别
(1)getWritableDatabase()方法以读写方式打开数据库.一旦数据库的磁盘空间满了,数据库就只能读而不能写,此时用getWritableDatabase()打开数据库就会出错. (2) ...