最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - A parser-blocking, cross site (i.e. different eTLD+1) script, is invoked via document.write warning - Stack Overflo

programmeradmin1浏览0评论

When I look at my site's console, I see in Chrome the following warning:

A parser-blocking, cross site (i.e. different eTLD+1) script, 
provider/trustlogo/javascript/trustlogo.js, 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
  for more details.

What is triggering this is the Sectigo's trust logo. You can see this warning on their site too.

Also I am using the same code as they have offered on their site in my page:

<script type="text/javascript"> //<![CDATA[
  var tlJsHost = ((window.location.protocol == "https:") ? "/" : "/");
  document.write(unescape("%3Cscript src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'%3E%3C/script%3E"));
//]]></script>
<script language="JavaScript" type="text/javascript">
  TrustLogo(".png", "SECEV", "none");
</script>

Can anyone help please to fix this warning? Thank you.

When I look at my site's console, I see in Chrome the following warning:

A parser-blocking, cross site (i.e. different eTLD+1) script, https://secure.trust-
provider./trustlogo/javascript/trustlogo.js, 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./feature/5718547946799104 for more details.

What is triggering this is the Sectigo's trust logo. You can see this warning on their site too.

Also I am using the same code as they have offered on their site in my page:

<script type="text/javascript"> //<![CDATA[
  var tlJsHost = ((window.location.protocol == "https:") ? "https://secure.trust-provider./" : "http://www.trustlogo./");
  document.write(unescape("%3Cscript src='" + tlJsHost + "trustlogo/javascript/trustlogo.js' type='text/javascript'%3E%3C/script%3E"));
//]]></script>
<script language="JavaScript" type="text/javascript">
  TrustLogo("https://sectigo./images/seals/sectigo_trust_seal_lg_2x.png", "SECEV", "none");
</script>

Can anyone help please to fix this warning? Thank you.

Share Improve this question asked Sep 9, 2020 at 12:58 StackedupStackedup 7702 gold badges10 silver badges30 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 2

Instead of invoking the script using document.write try to include it normally :

<script type='text/javascript' src='https://secure.trust-provider./trustlogo/javascript/trustlogo.js'></script>

<script type='text/javascript'>
  TrustLogo("https://sectigo./images/seals/sectigo_trust_seal_lg_2x.png", "SECEV", "none");
</script>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论