Jump to content

CSS file size too large??


SmokingMan

Recommended Posts

I installed the "Web Developer" extension on FF and when I was viewing the "speed report", this was one of the cautions I received:

CSS_SIZE - Caution. The total size of your external CSS is 4404 bytes, which is above 4080 bytes and less than 8K. For external files, try to keep them less than 1160 bytes to fit within one higher-speed TCP-IP packet (or an approximate multiple thereof). Consider optimizing your CSS and eliminating features to reduce this to a more reasonable size.
Can someone make sense of this and explain it to me? Does one need to be aware of the size of a CSS file, and if so, maybe split it into multiple stylesheets? This looks like a very useful tool for development, but I wasn't aware of any CSS file size optimization criteria.
Link to comment
Share on other sites

What they mean is probably the fact that a too large stylesheet would make the page load slow, but then again, a single large XHTML file can also make the page load slow.Splitting the CSS into several ones won't help. What matters is the total amount of KBs that are transmitted at one time. Having two stylesheets still means the same amount of code, thus the same amount of KBs.

Link to comment
Share on other sites

But is this really a problem that one needs to concern themselves with when designing pages? More people (at least in the USA), are going to broadband, so I would think that this would be a moot point, at least in my opinion. I'm just curious as this is the first time I've ever seen this being proposed as a possible problem.

Link to comment
Share on other sites

Yes more and more users are now using high speed connections and large css files won't matter to them, but it is always best to cater for everyone where possible. You never know who is going to visit your website from what connections, and the better your site loads no matter where they connect from the better the impression.It is also important to consider the effect this may be having on your bandwidth, if you keep your file sizes to a minimum then you can cut down you bandwidth usage and in some cases save yourself money if you are renting space on someone elses server.Check your css for any duplications and try to minimise it, look out for things like applying formatting using id to several elements when you could do it to them all at once using class, or applying it using class when you could apply it the the whole body etc.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...