Preventing FOUC (Flash of unstyled content)


#1

The stealjs docs have a section for preventing FOUC by loading the bundle stylesheet in the head of index.html

https://stealjs.com/docs/StealJS.guides.progressive_loading.html

While this works. It is causing the stylesheet to be loaded twice. Once when the page loads and again after the build js file loads.

Is there a way to tell steal that the file is already loaded so that it is not loaded again?


#2

With newer versions of steal, it should only load once. You went through the guide and it loads twice?

It should see you’ve already loaded a style tag at the URL it is about to load from and not load again.


#3

Thanks, I will try to update my steal version and will report back if it is still an issue