Site logo

Archived topic

Remove unused CSS

3 replies · Started by Eugene on April 17, 2021

Viewing posts 1–4 of 4

Hello all!

Chrome DevTool showed me some unused CSS slowing down the web https://duomit.com.
I just run UnusedCSS, and it showed me 79% of the CSS is unused.
WP Rocket: Optimize CSS Delivery is turned OFF permanently.

How could I remove unused CSS without damaging the appearance of the Generatepress Theme?

Thank you

Hi there,

there is no easy way to do this, and would entail generating separate CSS files for each and every page of the site as the USED CSS will vary. And every time you make a change to the site you may need to regenerate those files.

Its really not worth the hassle - especially as your sites combined CSS file is only 22kb and is cached by the browser. The majority of which ( over 80% ) is from the core WP blocks and the other plugins.

In comparison on your home page the Concrete Background Image is over 850kb. So better image compression would provide a far greater improvement.

I aslo see in your CSS file as lot of #sb-instagram selectors - i assume this is a Plugin - but i don't actually see it being used on the home page - might be worth checking with the plugin author on why its loading CSS when its not required.

Thanks, David!

You're welcome

This archived topic is closed to new replies.