Search code examples
optimizationcloudflaregtmetrix

How to remove Cloudflare’s javascripts slowing my site?


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.


Solution

  • 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.