3 ms·
I'm astounded that we still don't have proper lazy loading of stylesheets in 2022. We have async and defer for scripts but nothing for css. There are a bunch of
by pg_bot 4y ago
I'm astounded that we still don't have proper lazy loading of stylesheets in 2022. We have async and defer for scripts but nothing for css. There are a bunch of hacks that exist, but none of them work if you want to use a strict CSP. Even if you use it then you have to worry about a FOUT instead of automatically loading the stylesheet from the browser's cache.
Inlining critical CSS is madness for any project that is above a certain scale. Maybe you can do it for a single page, but in my experience the results are not worth the effort. You can make your site exceptionally fast without it.