Console error with Cloudflare.min.js

rocketloader

#1

I see this error from Chrome console:

 A Parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.cloudflare.com/cdn-cgi/nexp/dok3v=85b614c0f6/cloudflare.min.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) @ (index):19

What do you think is that issue?


#2

https://support.cloudflare.com/hc/en-us/articles/115004370247-Why-do-I-see-A-Parser-blocking-cross-origin-script-is-invoked-via-document-write-in-my-browser-console-


#3

Thanks @cscharff, I should have checked the support.


#4

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?


#5

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: https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-my-script-s-in-Automatic-Mode-

The other browser warning really is just a warning.


#6

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.


#7

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.


#8

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

Or document.appendChild() or parentNode.insertBefore().
Cite: https://developers.google.com/web/updates/2016/08/removing-document-write#how_do_i_fix_this


#9

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