Support » Plugin: LiteSpeed Cache » Critical CSS Enabled but still 96% CSS unused

  • Resolved albionx

    (@albionx)


    Sorry for the potentially noob question but here it goes.
    I’m using the LiteSpeed plugin and have enabled the “Generate Critical CSS” option (and ‘combine’, ‘minify’, etc). When I load my website I can see that effectively, LiteSpeed has taken over the CSS and regenerated a file: /wp-content/litespeed/cssjs
    /0c744.css?815a0

    Having said that, when I run Lighthouse, I’m warned that a lot of the code is not used. Using the ‘coverage’ tool in Chrome, I also see 96.8% unused bytes. For what’s worth, critical JS also has 72.8% bytes unused.

    Is this normal and expected? I was hoping for something like <5% of unused bytes. Thoughts on what I might be doing wrongly?

    The website is http://sueldoscalfra.com.ar, though I have others where I have the same problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Hai Zheng⚡

    (@hailite)

    Yes that is normal. CCSS isn’t for removing unused CSS. I planned a feature which called Unique CSS (UCSS for short), which is to remove unused CSS. No ETA. Maybe in v3.7?

    Ah, of course, you are right. I just re-read what critical CSS is and indeed it doesn’t do what I was hoping for. It would be nice if we had a CSS cleaner in the plugin! Maybe you can just adopt the PurifyCSS code, that is licensed MIT (https://github.com/purifycss/purifycss).

    Plugin Support Hai Zheng⚡

    (@hailite)

    I have tested the UCSS successfully months ago. Please keep an eye on our changelog around v3.7 :).

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.