soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
314 stars 29 forks source link

Critical Path CSS #2416

Open j-ki opened 3 years ago

j-ki commented 3 years ago

Describe the feature you'd like to see included in Oxygen. Critical Path CSS (CPC) is CSS that is required to render the above fold content of each web page. I'd like to see a module within Oxygen that calculates CPC and makes sure it gets served first before other CSS.

What are the use cases for this feature? CPC affects render blocking, First Contentful Paint, and First Meaningful Paint. Eliminating render blocking and decreasing First Contentful/Meaningful Paint time increases page speed and gives a better Google Pagespeed score.

Better Google Pagespeed score increases Google's "weight" of pages/posts, making them more likely to be indexed and rank higher in search results.

Examples of this feature or functionality. Mediavine Trellis: https://product-help.mediavine.com/en/articles/5389040-trellis-and-critical-css https://www.minddevelopmentanddesign.com/blog/how-to-create-critical-css-in-wordpress/ https://wordpress.org/plugins/autoptimize-criticalcss/

switchupcb commented 1 year ago

The problem with this feature request is that Critical CSS encapsulates all of the above-the-fold CSS and not only the output from Oxygen. I would find it rare for people to ONLY use Oxygen's CSS output on a website, which means that there would be CSS from other files that need to be extracted.

Given this context, I do not advocate for the implementation of this enhancement because it would result in a wasted effort, and the Critical CSS extraction should occur on all CSS files (not only Oxygen's).