Cloudflare is great – most of the time.

Posted on Updated on

So for the last month or so, I’ve given a few sites the Cloudflare boost. The DNS has come up faster, pages and the sites work much better.

However, I’ve discovered something it doesn’t work so well for…

I run GLPI and it’s great for computer digital asset management.

However today I discovered how frustrating it can be as well for certain applications. On my CMS and other static sites I have no problems with it, as it compresses the JS, CSS and HTML for speed – which is good.

But. As it turns out, GLPI doesn’t play nicely with a feature that CloudFlare offer. Granted, they call it BETA technology so I will give them that, but, after having upgraded my version to the latest and still have it breaking and breaking other parts that were not broken originally, I managed to finally figure out the problem.

The JS that Cloudflare inserts breaks pretty much every “html::” POST class in GLPI.

So, the solution is to disable what they call “Rocketscript”, and your site will work fine.

These pages will explain it a little better:

http://webmasters.stackexchange.com/questions/60276/how-does-cloudflares-rocket-loader-actually-work-and-how-can-a-developer-ensur
https://laracasts.com/discuss/channels/javascript/rocketscript-what-is-it
https://snippets.webaware.com.au/snippets/stop-cloudflare-rocketscript-breaking-wordpress-plugin-scripts/

Advertisements

One thought on “Cloudflare is great – most of the time.

    Stephen Monro responded:
    October 25, 2017 at 9:12 pm

    Further to this, CloudFlare’s rocketscript can also break jQuery and bootstrap too.

    Uncaught ReferenceError: jQuery is not defined bootstrap.min.js:6

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s