3 ms·
>The brief flash of your half-styled website is useless to me. Block rendering until the CSS is done. I have good news for you: https://web.dev/critical-render
by 7sidedmarble 4y ago
>The brief flash of your half-styled website is useless to me. Block rendering until the CSS is done.
I have good news for you: https://web.dev/critical-rendering-path-render-blocking-css https://web.dev/critical-rendering-path-render-blocking-css
CSS is already a render blocker.
- ehnto 4y agoWhich I think is the correct way to handle a CSS file, but it's not render blocking if you dynamically load it in with JS. That is what Critical path CSS is combatting against, the "FUIC" or flash of unstyled content, which of course is because people are loading in CSS asynchronously. A problem we created for ourselves. A lot of new approaches atomically separate the CSS and JS into dozens of smaller files that load in as the parts of the website that need them load in. Critial CSS is likely also a response to the issues that this approach creates. As the article alludes to, they're ideas that makes total sense clinically, but falls short really quickly in practice.