Forum Moderators: not2easy

Message Too Old, No Replies

Size of external CSS file

Should be size of a packet?

         

aroach

3:09 pm on Aug 10, 2003 (gmt 0)

10+ Year Member



I read a detailed explanation somewhere about making an external CSS file the size of a packet or less so that the entire thing downloads at once.

I can't recall where I was when I read this to look it up again. Does anyone here know about such a thing?

If I remember correctly packets were different sizes for different connections and they were suggesting you optimize for a 56K modem.

Nick_W

3:11 pm on Aug 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No idea, but how on earth could you do such a thing and if you could, would it make a difference worth the effort?

Nick

moltar

3:16 pm on Aug 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



imo that is nonsence. if i recall correctly, standard packet size for 56k modem ~ 500bits = 62bytes. you really need to optimize your css to fit into 62 bytes, and your speed might increase by split of a second.

killroy

4:55 pm on Aug 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



actually HTTP 1.1 uses a system of slow connect or something like that, I remember readign a paper on W3C about it. It starts with the largest packet and then gets smaller with each packet until it find sthe ideal one. Problem is most HTTP connections are over before then. I'd design for the largest size of 1500.

SN

moltar

5:45 pm on Aug 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Even if it's 1500, it is still almost impossible to fit css into 186 bytes.

Well, I guess you could, if you have few lines of code, but most sites have bigger css than that.

My css file now is 1700 bytes and it's fairly small.

TheDoctor

9:33 pm on Aug 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The size of a CSS file only matters for the first page it applies to. If your CSS file applies to several or all of the pages on your site, then download time is zero as the user moves from page to page, sinc eit is already in cache.

Obviously, a seriously bloated file can cause problems when a user first arrives at your site. You don't want to keep anyone hanging about.

[edited by: Marcia at 1:53 am (utc) on Aug. 11, 2003]

tedster

10:29 pm on Aug 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On other threads, we've talked about the "Flash of Unstyled Content" phenomenon. I'm thinking of creating two CSS files to handle this, and that approach to FOUC would also help with the "one packet" issue.

The first CSS file will just be basic.html -- some essential font information and perhaps div positioning in layouts where that is an important issue.

I'm thinking a very small file here, easily one packet. I would serve basic.css to all browsers and then use @import to bring in all the detailed rules for modern, standards supporting browsers.

My early experiments have shown me that dial-up users will benefit a lot from this approach.