pocketjoso / penthouse

Generate critical css for your web pages
https://jonassebastianohlsson.com/criticalpathcssgenerator
MIT License
2.64k stars 165 forks source link

Page speed insights CLS time on desktop get increased after resolving render blocking errors #336

Open AkashdeepSaini0 opened 2 years ago

AkashdeepSaini0 commented 2 years ago

After generating critical css using penthouse and defering css files , render blocking errors get resolved on google page speed insights but the cumulative layout shift on desktop get increased from .13 to 1.2.

pocketjoso commented 2 years ago

This is site specific - it depends on your site. Have you seen what elements on your page it is that are shifting the layout? The most common reason would be because some of your page content is only shown when JavaScript loads. Thanks to critical css you are now showing your page content earlier, but because of the JS problem, it's not he full page. The issue could also be happening because the critical css is missing some styles, but this is rare. If it's the case though I would be interested to get a reproducible case, to investigate.