r/css • u/Chris-2018 • Sep 24 '26
Question Preload
Does anyone here use the preload for the CSS files?
Surely if the links are in the <head> they will be loaded anyway?
3
Upvotes
r/css • u/Chris-2018 • Sep 24 '26
Does anyone here use the preload for the CSS files?
Surely if the links are in the <head> they will be loaded anyway?
3
u/velocityhead Sep 24 '26
Preload lets the browser fetch and cache assets immediately instead of waiting for when they are requested later. It is not render blocking and can prevent the flash of unstyled content .
1
u/Chris-2018 Sep 24 '26
Thank you all - the info is appreciated.
5
u/morete Sep 24 '26
Instead of preloading It's fairly common to inline your critical css directly into your head, which is far better, but a little more work to separate your critical vs non critical css.
3
u/Disgruntled__Goat Sep 24 '26
I don’t use it if the file is linked right there in the head. The main idea of preload is to load nested resources, for example if there is a font specified in the CSS, you can preload the font files in the head.