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的更多相关文章

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

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

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

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

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

  5. JQuery需要手动回收xmlHttpRequest对象

    今天在园子里面看到kuibono的文章说JQuery不会自动回收xmlHttpRequest对象,并且在每次Ajax请求之后都会创建一个新的xmlHttpRequest对象,感到惊讶,索性写了一个程序 ...

  6. 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, ...

  7. jquery与ajax的XMLHttpRequest对象介绍

    首先  认识一个对象 这个对象叫XMLHttpRequest XMLHttpRequest对象可以提供在不刷新页面的情况下向服务器发送异步请求,并且接受服务器端返回的结果.从而实现局部更新当前页面的功 ...

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

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

  9. jQuery的ajax问题

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

随机推荐

  1. 移动UI

    UI设计需要关注:色彩,信息布局,交互流程,用户体验,尺寸等

  2. U盘启动安装Ubuntu

    1.UltraISO制作USB启动盘 2.打开U盘目录下的\syslinux\syslinux.cfg, 将default vesamenu.c32注释为 # default vesamenu.c32

  3. HDU 5777 domino

    贪心一下.有k次机会,也就是那些数字中,最大的k-1可以不选择.答案为:sum{a[i]}-sum{最大的k-1个a[i]}+n.注意:k>=n的时候直接输出n. #pragma comment ...

  4. 【01-14】hibernate时间生成

    package rugal.sample.core.entity; import java.util.Date; import java.util.UUID; import javax.persist ...

  5. 股票K线图-JfreeChart版

    http://blog.csdn.net/ami121/article/details/3953272 股票K线图-JfreeChart版 标签: jfreechartpropertiesapplet ...

  6. akka 入门

    http://blog.csdn.net/thkhxm/article/details/40182835 1.首先安装akka的相关包-- http://akka.io/downloads/2.导入依 ...

  7. POJ2524:Ubiquitous Religions (并查集模板)

    Description There are so many different religions in the world today that it is difficult to keep tr ...

  8. Git 删除文件

    在Git中,删除也是一种修改的操作,我们验证一下,先在工作目录中添加一个新文件test.txt,并且提交: $ git statusOn branch masterUntracked files:  ...

  9. IOS设备上网页中的页面滚动效果模拟

    可能咋一看不知道我说的是个啥,因为iOS本来就用这功能的啊,还模拟它干啥?先听我说下项目背景哈 我现在开发的是一个webapp,主要是用在ipad上,这个app的大小是固定大小的,为了防止触摸它出现弹 ...

  10. UIKit控件直接显示网页文字内容

    NSString *html = @"<bold>Hello</bold> Now<br> <em>iOS</em> can cr ...