本文介绍了通过document.write调用解析器阻塞的跨源脚本 - 如何规避它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Chrome开始实施





  • 解决方案

    根据,您可以:使用异步脚本加载,使用< script src =...async>

      / code>或 element.appendChild()


    Google Chrome started implementing Blocking the load of cross-origin, parser-blocking scripts inserted via document.write in the main frame on slow networks, which causes the following error:

    However, my web page requires loading a third party script synchronously, using document.write('<script src="..."></script>'). How to circumvent that blockade?

    More about that change:

    解决方案

    According to Google Developers article, you can:

    这篇关于通过document.write调用解析器阻塞的跨源脚本 - 如何规避它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

    07-22 17:37
    查看更多