Size of CSS files

E

e n | c k m a

How large should an external .css file be? As far as good practices go,
should there be a limit? At the moment my file is up to 3.40kb - should it
be smaller?

I understand it's not too much of an issue because it still only needs to be
downloaded once. But does anyone have any opinions on this?

Thanks in advance,
Nick.
 
B

brucie

How large should an external .css file be?

the same as all your markup goodies - as small as possible
I understand it's not too much of an issue because it still only needs to be
downloaded once.

but it still needs to be downloaded.
 
D

DU

e said:
How large should an external .css file be? As far as good practices go,
should there be a limit? At the moment my file is up to 3.40kb - should it
be smaller?

I understand it's not too much of an issue because it still only needs to be
downloaded once. But does anyone have any opinions on this?

Thanks in advance,
Nick.

Here's an excellent resource answering your question regarding external
CSS file:

http://www.websiteoptimization.com/services/analyze/

DU
 
E

e n | c k m a

Here's an excellent resource answering your question regarding external

That is an excellent resource, thanks!

It told me this though:

a.. CSS_SIZE - Caution. The total size of your external CSS is 3489 bytes,
which is above 1160 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.

Which I'll definately take into consideration - however, would splitting the
one .css file into two and using an import rule from the first to the second
be considered "cheating"?
 
D

DU

e said:
That is an excellent resource, thanks!

It told me this though:

a.. CSS_SIZE - Caution. The total size of your external CSS is 3489 bytes,
which is above 1160 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.

Which I'll definately take into consideration - however, would splitting the
one .css file into two and using an import rule from the first to the second
be considered "cheating"?


Would splitting the file in 2 distinct separate files change in any way
the size? What is the real issue here? Optimizing the CSS file was
recommended. What's wrong with such recommendation?

"Reducing the number of files referenced in a web page lowers the number
of HTTP connections required to download a page. Depending upon a
browser's Cache settings, it may send an If-Modified-Since request to
the web server for each CSS, JavaScript or image file, asking if the
file has been modified since the last time it was downloaded. By
reducing the number of files referenced in a web page, you reduce the
time required for these requests to be sent and their responses
received. Too much time spent querying the last modified time for
referenced files can delay the initial display of a web page since the
browser must check the modification time for each CSS or JavaScript file
before rendering the page."
Tips For Authoring Fast-loading HTML Pages
http://devedge.netscape.com/viewsource/2003/page-load-performance/

IMO, the reasonable thing to do here is to optimize your CSS (or your
whole source code); there are number of ways and tutorials on this. The
one at DevEdge is not IMO the best on this issue.

DU
 
E

e n | c k m a

IMO, the reasonable thing to do here is to optimize your CSS (or your
whole source code); there are number of ways and tutorials on this. The
one at DevEdge is not IMO the best on this issue.

Okay thanks, I'll look into this. At the moment, I can't really see anyway
of optimizing the code more than I have already... I'll check out these
tutorials and maybe find another way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top