Jump to content

CSS File Size


ober

Recommended Posts

I'm just curious... I've always tried to keep my CSS file sizes to a minimum, like less than 6Kb.  I've read that this can reduce the load time of the site.  But I've been looking at how some other people do it and I'm seeing file sizes of 20Kb or more.

 

Any thoughts on this?

Link to comment
https://forums.phpfreaks.com/topic/162197-css-file-size/
Share on other sites

While smaller is obviously faster, in today's high speed world I would consider 20Kb a perfectly normal file size. There are several other things you can do to speed up the load time of that file too...Content Management Networks, Compression, Caching, etc

A 20kb CSS file may be normal, but if you use heavy graphics or file formats elsewhere, then a smaller and clean CSS file is better. I try to keep mine to a minimal as well, so at least I don't have to worry about CSS clogging down my site. I think some users forget that all of the sizes add up eventually!

Filesizes do add up, but html requests are more damaging, so while going for compressed CSS files as recommended in this thread is a good idea, consolidating multiple CSS and image files into single files even more beneficial. Especially with images, as the single merged-image size often ends up being smaller than the sum of the smaller image sizes (which I believe is a result of the metadata attached to the images).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.