Layout: Flash of no style

started by Rmt on May 14, 2004 — RSS Feed

Rmt Rmt
Posts: 2

Hello all

I've encountered a problem with a website I am working on...when it loads over a 56kb modem, there is a pause of a few seconds where no style is being displayed.  I now I am probably being picky but is there a way of preloading the CSS.

I am using the @import style to load the CSS.

Many thanks

Ross

Joe Gillespie Joe Gillespie
Posts: 528

The only way to 'preload' an external style sheet is to put it on a previous page, then it will be cached by the browser.

The style sheet starts to load as soon as the link is encountered by the browser reading from top down. If the style sheet was on the page, it would be there before the HTML.

If the browser has to load an external style sheet in parallel with the HTML, then they are competing for the available bandwidth. Which one loads first is a matter of luck. You can't change the order other than by delaying the one you want to load last, which results in a slower overall load time.

If it is a large style sheet, you could split it into selectors that are essential to display the first page and ones that crop up on later pages. That would lighten the load.

It's more to do with lightening the page sizes than anything.

Baxter Baxter
Posts: 157

It's an IE bug, and pretty well documented.
Here's a decent starting point:
http://www.bluerobot.com/web/css/fouc.asp

Rmt Rmt
Posts: 2

Thanks guys,  I knew that I'd read about it somewhere before but couldn't for the life of me remember where!

That link has hit the nail on the head though!!

C Edward C Edward
Posts: 0

hi my serious passion right now is to make flash intros pages for my welcome page at my site, don't have any flash design experience before but i want to find out way on how to make simple intro pages for free or the cheapest way!

C Edward C Edward
Posts: 0

hi my serious passion right now is to make flash intros pages for my welcome page at my site, don't have any flash design experience before but i want to find out way on how to make simple intro pages for free or the cheapest way!

You must login to reply