How to remove Cloudflare’s javascripts slowing my site?
Asked Answered
G

3

5

I have a WordPress site at http://biblicomentarios.com, and I use Cloudflare. No matter what I do, I can’t remove two javascript that comes from Cloudflare. I use GTMetrix, and I see them in the waterfall tab blocking my site. Those are email-decode.min.js and rocket-loader.min.js. Of course, I’ve already disabled email obfuscation in the Scrape Shield tab, and I have Rocket Loader disabled. I purged ALL my caches (Cloudflare cache, Autoptimize cache, SuperCache, even the Cpanel cache). But the js’s are pretty persistent, and they insist on appearing in GTMetrix waterfall, as blocking js’s and so slowing my site. Also, I can’t add expires headers to them, so I have more than a reason to want them out of my site. Is there any way to remove them as they are already disabled in the Cloudflare panel?

blocking scripts from cloudflare Expires headers problem

Please, note - Rocket Loader is disabled; the Scrape Shields email obfuscation is disabled. - I have not a “cdn-cgi” directory within my site or server. Typically, this directory is injected by Cloudflare, so both scripts come from Cloudflare. - I have no “apps” installed through CloudFlare. - The blocking scripts paths are https://ajax.cloudflare.com/cdn-cgi/scripts/2448a7bd/cloudflare-static/rocket-loader.min.js and http://biblicomentarios.com/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js.

Goldarn answered 28/9, 2018 at 14:36 Comment(3)
I don't think Rocket Loader is blocking anything: support.cloudflare.com/hc/en-us/articles/… Have you enabled developer mode and re-ran your GTMetrix analysis to see how much of a performance hit these scripts are having on your site?Sunup
Yes, that page sets a theory, but GTMetrix gives the waterfall graphic as I attached above.Goldarn
I liked your idea about enabling developer mode. Thanks. But, unfortunately, yes, Rocket Loader was slowing my site, I don't know why.Goldarn
S
6

Depending on what Cloudflare plan you're on, you can set up "Page Rules" for your site or subsections of your site.

I'd suggest adding 2 rules -

 Disable Security

This should prevent email-decode.min.js from loading.

 Disable Performance

This should prevent rocket-loader.min.js from loading.

I think you can have one setting per rule, and 3 page rules if you're using the Free plan.

Sunup answered 28/9, 2018 at 14:53 Comment(2)
You gave me the clue I needed! I changed my Page Rules and found the culprit. I'm not sure to disable all the performance and security is the better combination, but it solved the js's persistence problem.Goldarn
The CloudFlare interface has changed recently. Turning off the "Scrape Shield" seems to do the trick now, no need to disable security.Canopus
W
7

Go to Scrape Shield

Then Disable Email Address Obfuscation This will Disable email-decode.min.js

Go to Speed -> optimization

Then Disable Rocket Loader™ This will Disable rocket-loader.min.js

Remember to Clear Cache

Wines answered 18/2, 2021 at 12:30 Comment(0)
S
6

Depending on what Cloudflare plan you're on, you can set up "Page Rules" for your site or subsections of your site.

I'd suggest adding 2 rules -

 Disable Security

This should prevent email-decode.min.js from loading.

 Disable Performance

This should prevent rocket-loader.min.js from loading.

I think you can have one setting per rule, and 3 page rules if you're using the Free plan.

Sunup answered 28/9, 2018 at 14:53 Comment(2)
You gave me the clue I needed! I changed my Page Rules and found the culprit. I'm not sure to disable all the performance and security is the better combination, but it solved the js's persistence problem.Goldarn
The CloudFlare interface has changed recently. Turning off the "Scrape Shield" seems to do the trick now, no need to disable security.Canopus
C
0

Just be careful.

Disable Performance

Will turn off

Auto Minify
Rocket Loader
Mirage
Polish
Colorimeter answered 6/8, 2021 at 17:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.