- This topic has 7 replies, 3 voices, and was last updated 1 year, 1 month ago by David.
August 9, 2019 at 5:38 pm #980341GG
Hi. I keep getting this kind of thing flagged in some speed tests like Google Lighthouse (see shared URL). Do you think this is part of my minified CSS? Or what is it?August 9, 2019 at 7:30 pm #980382LeoStaffCustomer SupportAugust 9, 2019 at 9:41 pm #980432GG
I deactivated the cache/minification plugin (LSC Plugin) and I get these two paths now marked as unused:
wp-content/themes/generatepress/css/all.min.css?ver=2.3.2. When I enable the plugin, the path is as shared in the link.August 10, 2019 at 6:07 am #980539DavidStaffCustomer Support
It flags this CSS because a significant % of that CSS is not required on that particular page.
What it cannot calculate is that some of the unused CSS is required for other pages, user login status or elements that are loaded after initial page load.
Yes you could go to the extent of creating a Critical CSS path so it loads the the necessary CSS first and defers the rest for later loading. But this is a huge task and really not worth it for such a small amount of CSS. So i would ignore it.
One thing however:
Are you using the Gutenberg editor?
If not then the Disable Gutenberg plugin by Jeff Starr has an option to remove front end styles. Haven’t tested it ( and would only do so on a backup / staging site ) but this could remove the first CSS file being loaded.August 10, 2019 at 8:37 am #980748GG
The LSC plugin has an option to generate critical CSS. So I am not sure if it is working or not. I guess I can ignore that warning. I do use the Gutenberg editor and have converted all my posts to it. But would you tell me why it loads frontend styles while it works backend?August 10, 2019 at 8:57 am #980758DavidStaffCustomer SupportAugust 10, 2019 at 1:51 pm #980905GG
Aha. That makes sense. But both codes are only like 10kb so not worth the hustle. Thanks for the clarification.August 10, 2019 at 3:59 pm #980964
- You must be logged in to reply to this topic.