Size of CSS files

Discussion in 'HTML' started by e n | c k m a, Nov 29, 2003.

  1. 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.
     
    e n | c k m a, Nov 29, 2003
    #1
    1. Advertising

  2. e n | c k m a

    brucie Guest

    in post <news:Bs9yb.32909$>
    e n | c k m a said:

    > 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.

    --
    brucie
    30/November/2003 09:04:28 am
     
    brucie, Nov 29, 2003
    #2
    1. Advertising

  3. e n | c k m a

    DU Guest

    e n | c k m a wrote:
    > 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
     
    DU, Nov 30, 2003
    #3
  4. > Here's an excellent resource answering your question regarding external
    > CSS file:
    >
    > http://www.websiteoptimization.com/services/analyze/


    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"?
     
    e n | c k m a, Nov 30, 2003
    #4
  5. e n | c k m a

    DU Guest

    e n | c k m a wrote:

    >>Here's an excellent resource answering your question regarding external
    >>CSS file:
    >>
    >>http://www.websiteoptimization.com/services/analyze/

    >
    >
    > 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
     
    DU, Nov 30, 2003
    #5
  6. > 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.
     
    e n | c k m a, Nov 30, 2003
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Madhanmohan S
    Replies:
    5
    Views:
    7,788
    Madhanmohan S
    Sep 3, 2004
  2. Andreas Klemt
    Replies:
    6
    Views:
    11,217
    Peter Theill
    Nov 28, 2004
  3. =?Utf-8?B?QmlkYXJrb3Rh?=

    How to set the DataGrid Row Size to a fixed size.

    =?Utf-8?B?QmlkYXJrb3Rh?=, May 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    840
    =?Utf-8?B?QmlkYXJrb3Rh?=
    May 19, 2005
  4. Neil Zanella
    Replies:
    4
    Views:
    494
    Gianni Mariani
    Oct 9, 2003
  5. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,653
    Michael Jung
    May 25, 2008
Loading...

Share This Page