Wordpress LScache Plugin: Cloudflare Rocket Loader exclusion feature request
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello, I wonder if you can add the possibility to exclude some JS file from loading by Cloudflares Rocket Loader by adding attribute data-cfasync= false Here is a reference https://support.cloudflare.com/hc/en-us/articles/200169436-How-can-I-have-Rocket-Loader-ignore-specific-JavaScripts- Thank you very much for your great work and dedication! Best Regards, Jaro Can you specify adding that attribute in which process? e.g. When doing JS minify or combine? Or just original JS src without any optimization? When JS file is on the list for this attribute, the original file will have set attribute. When minification is set, the minified files will have set attribute. When combined, all JS on this list should be in a separate file and this separate file will have the attribute. That would be ideal, but if its too complicated for having an extra file for combined JS with this attribute, the first 2 scenarios will be very useful anyway. Thank you so much! Hi @pixtweaks, may I confirm the data-cfasync is still an official attribute can bypass Rocket Loader and are you experiencing on your site? Yes, I have to do it manually otherwise website breaks, if its part of the plugin it would help a lot, and I think more people would use Rocket Loader too. Thank you very much! Currently all JS will have attribute defer if you enabled Load JS Deferred. Do you want we all that cfasync to all deferred JS or just curtain ones? It has the opposite effect, when we add data-cfasync= false , Rocket Lodar will bypass those files. So we dont need it to add this attribute to any JS file by default, if theyre deferred or not. I think we need two more input boxes for names of JS files: 1st adds data-cfasync 2nd adds data-cfasync and minifies In both cases, these files will be excluded from the rest of JS optimization. Im happy with this because to add files combination, it would be too complex and I dont think anybody would go to that complexity when optimising a website. Thank you
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference