gpt4 book ai didi

google-chrome - Chrome 和其他浏览器会放弃对同步 XMLHttpRequest 的支持吗?

转载 作者:行者123 更新时间:2023-12-03 14:16:39 25 4
gpt4 key购买 nike

同步 XMLHttpRequest 已被弃用,这意味着对它的支持最终将被删除,这是我在 Chrome 中收到的消息:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.



所以,我的问题是,如果是,如果是,主要浏览器(尤其是 Chrome)何时会放弃对同步 XMLHttpRequest 的支持?

最佳答案

更新:(最后更新于 2019 年 2 月)

  • Chrome 54 removes在微任务期间支持同步 XHR
    执行。
  • Chrome 80 removes在页面关闭期间支持同步 XHR,企业用户可以在 Chrome 82 之前使用策略标志来解决问题。

  • 恕我直言,现在(比 6 年前)这个功能最终被删除的可能性更高。与往常一样,建议避免同步 XHR 的新用途,并抢先迁移现有的,因为浏览器可以选择在几个月通知后删除它们。

    我没有内幕消息,但这里有一些研究。

    decision to deprecate于 2014 年 2 月制造。Chrome 宣布它为 deprecated同月但没有 show a warning直到 2014 年 11 月。Firefox deprecated 2014 年 6 月(Firefox 30)。

    通常,Web 的重要功能需要时间来迁移。例如,Chrome deprecated NPAPI 支持于 2013 年 9 月。它是 disabled by default 2015 年 4 月 (Chrome 42),并计划在 2015 年 9 月完全删除。

    在这种情况下, ExtJS still使用此功能进行模块加载。其他模块在 unload 中使用它ping 服务器的事件,但 beacon 替代技术远未准备好迎接黄金时间。有 some more引人注目的用例。

    大约 2.5% of websites (更新:2017 年 10 月下降到 0.8%)仍在使用同步 XMLHttpRequest。它看起来不会很快消失。

    关于google-chrome - Chrome 和其他浏览器会放弃对同步 XMLHttpRequest 的支持吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30876093/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com