doubt about writing the CSS file?

Discussion in 'CSS' started by vetrivel, Jul 25, 2009.

  1. #1
    Hi ,
    I have a website and it have a CSS file (only one file).Almost all the CSS related stuffs are added in a single file and include it in the header file.

    Now my site is loading bit slower and i started optimization .
    while doing so i found that unwanted images are loading in the page(i found it my putting my URL in the external site,which is used to test the site speed).
    Then only i realised that all the images called in the CSS file are loaded in each page.

    Is this a Good sign of writing a CSS?
    am i wrong or my css is wrong?
    Please advice me.
     
    vetrivel, Jul 25, 2009 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Unless you, as the developer have set the header to no-cache, or you, as the user, have set your browser to no-cache, the external files and the images will have been downloaded the first time, and afterward loaded from the browser cache.

    Note: IE is screwy, and tends to reload background images (the type found in css files) each time. It's stupid.

    cheers,

    gary
     
    kk5st, Jul 25, 2009 IP
  3. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,
    I always feel first impression is the best impression.
    so when some one visit our site for the first time then will they wait for long to see our.
    If this is the case ,I wont do this as user.If i visit a site and it take time to load .I will choose alternate website i will proceed.

    I think this is what most of the user will like ?


    Please advice me.







     
    vetrivel, Jul 26, 2009 IP
  4. gvambedkar

    gvambedkar Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Code a single CSS file for common layout and styling of the site. And add page wise CSS file if necessary to individual pages.

    Then we can get optimized download speed even for first time and even the cache is disabled.
     
    gvambedkar, Jul 26, 2009 IP
    qazu likes this.