Console error with Cloudflare.min.js

I see this error from Chrome console:

 A Parser-blocking, cross site (i.e. different eTLD+1) script,, 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.
    (anonymous) @ (index):19

What do you think is that issue?

1 Like

Thanks @cs-cf, I should have checked the support.

My site stuck at loading when I enable rocket loader, those warnings does show in the console.
After rocket loader is disabled, my site runs normally.
So those warning doesn’t seems only “warning”, maybe Cloudflare should look into this problem?

More likely some other aspect of Rocket loader was interfering with your site. I’d recommend opening a support ticket if you’d like to pass the details along to Cloudflare support. Also you can look at this article if there is a specific script it’s interfering with:

The other browser warning really is just a warning.

I saw this too. It’s an issue with Chrome (the new IE), or Google (the new MS) thinking they know better than everyone else and forcing standards. Basically speaking, they don’t allow document.write in 2G networks (or lower). So Chrome desktop is giving you a warning only… however 10% of the time it actually breaks as if you’re on 2G. Their own online apps sometimes break in Chrome for the same reason. It’s sorta ridiculous.

I think it’s in our backlog to look at/change the code to get rid of that error if possible… just hasn’t made it to a sprint yet.

Why is it you use document.write() anyhow? Why not just parse the script into the HTML?

Or document.appendChild() or parentNode.insertBefore().
Cite: Intervening against document.write() - Chrome Developers

Hi! Could you help me? I dont understand where i should add this script! Thank you!

According to Google Developers article, you can:

  • Use asynchronous script loading, using <script src="..." async> or element.appendChild() ,

It is better don’t use document.write for CDN, here is workaround:

var script = document.createElement('script');  
script.src = "....";