Eric Turner
Eric Turner

Reputation: 41

Loading CSS too slow using Javascript

I'm developing a online registration system. I have my CSS files loaded in javascript file using "skel.init". When loading other pages or refreshing the website. It loads CSS pretty slow that my website will appear with no css for almost 1 sec while loading. Are there any solutions that can fix this? (P.S. It's not my network's problem. I had my network tested)

Upvotes: 0

Views: 1770

Answers (2)

Eric Turner
Eric Turner

Reputation: 41

I know the problem... This is called the Flash of Unstyled Content. I solve this on Eliminate flash of unstyled content

Upvotes: 1

TW80000
TW80000

Reputation: 1515

If you load your CSS via a <link> in the <head> of your page, the browser will load the CSS before the HTML content of the page and you will not see the site without the proper CSS applied.

Upvotes: 2

Related Questions