確切的說是警告,內容是:
A Parser-blocking, cross-origin script, http://s4.cnzz.com/stat.php?id=xxx&show=pic, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.
錯誤原因是:頁面渲染完成后使用了document.write()(cnzz統計代碼引起的,chrome53以上版本會報錯。)。
解決方案:將統計代碼改為異步加載
var cnzz_s_tag = document.createElement('script'); cnzz_s_tag.type = 'text/javascript'; cnzz_s_tag.async = true; cnzz_s_tag.charset = 'utf-8'; cnzz_s_tag.src = 'https://w.cnzz.com/c.php?id=xxxxxx&async=1'; var root_s = document.getElementsByTagName('script')[0]; root_s.parentNode.insertBefore(cnzz_s_tag, root_s);
stackoverflow傳送門:http://stackoverflow.com/questions/39610829/a-parser-blocking-cross-origin-script-is-invoked-via-document-write-how-to-ci