Google PageSpeed Audits suggest adding Critical CSS of above-the-fold content to a <style>
tag in the <head>
, and defer the rest until after the content has loaded.
Whilst I don't agree with this practice, what is the correct way to implement it?
I have a few reservations against using it:
- FOUC (either individual elements or the page as a whole using
visibility: hidden
) - Too much content above the fold to style with minimal inlined CSS to prevent FOUC being seen
- Additional page weight on load, before getting to the content itself
- No caching of inlined CSS, meaning it has to be re-downloaded every time a page loads
I do not use CSS frameworks, so there is no bloated CSS to download anyway.