猿问

用jqueryi18n,jquery 会出来warning,求解决方案

在使用 jqueryi18n之后,浏览器console会来一段

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

怎样能把这个warning去掉


炎炎设计
浏览 566回答 1
1回答

料青山看我应如是

这个⚠️信息的原因在于使用了同步的xhr,会导致主线程阻塞,看看有没有做相关的操作,比如$.ajax中写了acsyn:false之类的。修改后最好清除下浏览器缓存再调试。
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答