SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast tentonjim's Avatar
    Join Date
    Aug 2003
    Location
    Seattle, WA USA
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you refresh cached CSS file when you make changes

    Hello SP'ers...
    When you make an edit to an existing .css file and upload it to your server, what is the best method of making sure the browser reloads the file (doesn't use the existing one in its cache) and gets the latest version of the .css file?

    I don't want to rename it, I want to use the existing file...

    Thank you,
    JimS.
    Jim Summer
    ~ Twitter SEO_Web_Design or Google+

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    F5

    You can probably set some HTTP no-cache headers on it, but that would defeat the speed benefits of using CSS.

  3. #3
    SitePoint Enthusiast tentonjim's Avatar
    Join Date
    Aug 2003
    Location
    Seattle, WA USA
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had thought about maybe setting a cookie or something to see if they had been there before, and if not use the cookie to trigger some javascript or something to refresh the page... I am not sure how to handle this.

    Has anyone else experienced this problem?
    Jim Summer
    ~ Twitter SEO_Web_Design or Google+

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Theres some info about caching here that might be of interest.

    http://www.mnot.net/cache_docs/

    Paul

  5. #5
    SitePoint Enthusiast tentonjim's Avatar
    Join Date
    Aug 2003
    Location
    Seattle, WA USA
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul O'B... good reading there at a qucik glance... looks like something in there will fit the bill. When I get an implementation to work I will post the answer here.

    In the meantime, if anyone else has an answer... let'er rip!

    Thanks,
    Jim
    Jim Summer
    ~ Twitter SEO_Web_Design or Google+


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •