#1
  1. No Profile Picture
    No. 4
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    UK
    Posts
    89
    Rep Power
    11

    external CSS file too large?


    hi

    i just wanted to get some opinions on this...

    running a page through www.weboptimization.com's test brought the following message

    CSS_SIZE - Caution. The total size of your external CSS is 4399 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.

    How important is this and should I consider splitting the CSS file into, say, 4 smaller files or would that be as bad (or worse even)?

    Thanks for your thoughts,

    jim
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,007
    Rep Power
    2791
    Ignore it. Try to cascade your CSS code.
  4. #3
  5. No Profile Picture
    No. 4
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    UK
    Posts
    89
    Rep Power
    11
    thanks PHP-Newb

    when you say i should cascade my CSS - what do you mean?

    cheers,

    jim
  6. #4
  7. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,007
    Rep Power
    2791
    Well, for example, if you had this in your CSS file:

    a {text-decoration:none;font-size:19pt;color:blue;}

    a:hover {text-decoration:none;font-size:19pt;color:red;}



    You would be better to do this:

    a,a:hover {text-decoration:none;font-size:19pt;}

    a {color:blue;}

    a:hover {color:red;}


    Try and re-use as much as you can, it saves on loading time and is just a good habit to get in to.
  8. #5
  9. No Profile Picture
    No. 4
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    UK
    Posts
    89
    Rep Power
    11
    oh... ok thanks

    jim

IMN logo majestic logo threadwatch logo seochat tools logo