Unused css and Unsed js

How can I solve the unused css and unsed js problem while i’m using a php script based website not a wordpress website ?

May I ask if you would like to solve that on serverside, or on Cloudflare side?

As far as I know Cloudflare does not provide something like “critical CSS” or “Critical JS” as a function or as a product.

On PHP side I also do not know any reliable way of this optimization. But what you can do is:

  1. do not exclude unused CSS or unused JS. Thats simple, but most things are just obviously that you dont need them
  2. use some NodeJS based solution for criticalCSS
  3. use webservices like this PurifyCSS they will generate the needed CSS for you.

When it comes to ciritcal JS… never heared of this, as other programms mostly can not determinate if the JS not is getting used or not.

WordPress is also based on PHP. Just sayin.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.