Chrome : "Parser-blocking, cross site (i.e. different eTLD+1) script..."

Rory_A

Administrator
Staff member
#1
Hi,

Parser-blocking, cross site (i.e. different eTLD+1) script, https://secure.statcounter.com/counter/counter.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.com/feature/5718547946799104 for more details.
(anonymous) @ aaa.org/:1506
This is a warning (not error) Chrome gives for javascript that uses the code document.write. In chrome errors are marked with red icons, warnings marked with yellow icons.

This warning is basically saying :

"If someone is on a very very slow internet connection this code might not run"

SOLUTION

You can avoid this warning and condition with some code like this :

<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
var sc_project=PROJECT-ID;
var sc_invisible=1;
var sc_security="SECURITY-CODE";
</script>
<script type="text/javascript" async
src="https://secure.statcounter.com/counter/counter.js"></script>
<noscript><div class="statcounter"><a title="hit counter"
href="https://statcounter.com/free-hit-counter/"
target="_blank"><img class="statcounter"
src="https://c.statcounter.com/PROJECT-ID/0/SECURITY-CODE/1/"
alt="hit counter"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->

PLEASE NOTE :

- with this code you can only use the invisible counter

- you must change the above code to use your project id and security code.

To get your project id and security code please do these steps :

- login to www.statcounter.com
- click on the wrench to the far right of the project name
- click the Security Code link in the left menu (about 1/2 way down)

Please contact us if you have any questions. Our email address is support at statcounter dot com.

Regards,
Rory
StatCounter Team
 
Last edited:
Top