cnzz统计代码被谷歌浏览器拦截警告

前一段时间在使用CNZZ统计代码的时候,Chrome浏览器控制台弹出一段警告,提示如下

A parser-blocking, cross site (i.e. different eTLD+1) script, http://s96.cnzz.com/z_stat.php?
id=1234567890&show=pic2, is invoked via document.write. The network request for this script MAY be 
blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page 
load, it will be confirmed in a subsequent console message. See 
https://www.chromestatus.com/feature/5718547946799104 for more details.

经过网上查询一番之后,得到的结果是和浏览更新有关(chrome53以上版本会报错),解决办法其实也是非常简单,只需要保证引入的script脚步异步下载即可H5新增的async='async'
属性则可以让脚本被异步执行,所以说直接在当前script标签加入async='async即可


                    
                    

你可能感兴趣的:(javascript)