Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automatically clearing cached version of your site.

Discussion in 'Website Design Forum:' started by NoisyShaun, Aug 5, 2009.

  1. NoisyShaun

    NoisyShaun Junior Member

    Hey all!

    I have made some changes to one of my sites.
    I noticed on a windows XP (IE6) (aaagh!) machine that I had to clear IE’s Cache for the changes to take effect (Shift + F5) even after refreshing the page.
    Is there a way to make my site’s pages automatically clear the cached version itself when it is loaded in IE? (or any other browser, however I didn’t have this issue on my Mac which was running firefox.)


  2. I think that a cache has to be cleared at the computer .. I don't know of any way to do it via any sort of code (other than C# and I think computers would treat it like a virus) I will have a think about it more.. :)
  3. openmind

    openmind Senior Member

    You have got some cache control meta-tags:
    Source: Useful HTML Meta Tags - cache, no-cache, robots, refresh, content, keywords, description, expires, author, etc.
  4. I stand corrected.. interesting thing to know :) thanks Phil :D
  5. openmind

    openmind Senior Member

    My user title "Techy geek bloke" isn't for nothing ya know :p
  6. I thought it was just for the ladies ;) :lol:
  7. openmind

    openmind Senior Member

    You can also do it programattically:

    <cfheader name="expires" value="#now()#"
    cfheader name="pragma" value="no-cache"
    cfheader name="cache-control" value="no-cache, no-store, must-revalidate">
      Header('Cache-Control: no-cache');
    Header('Pragma: no-cache');
    <% Response.CacheControl "no-cache" %>
    Response.AddHeader "Pragma""no-cache" %>
    Response.Expires = -%>
    response.setDateHeader ("Expires"0);
    And finally with a dead badger :)
  8. openmind

    openmind Senior Member

    Oh aye, my missus loves a bit of binary ;)
  9. openmind

    openmind Senior Member

    One thing to point out though is you should be a little careful as Google may not cache the page..
  10. Thats too much information Phil :p
  11. glenwheeler

    glenwheeler Senior Member

    A way to do it is to flushdns in cmd then refresh the browser. This is not automatically thought but a useful one for other users.
  12. openmind

    openmind Senior Member

    The flushdns command is to renew the IP location of a site such as when the name servers are changed. It won't prevent or clear a cached version of a website being stored in the browser cache :)
  13. NoisyShaun

    NoisyShaun Junior Member

    Thanks all for your replies guys!

    -Openmind, Thanks for the snippet of code -


    When you say about google not caching it, can that impact on the rankings, or will it just mean when you visit google's cached version of the page it will be blank?

    Thanks again!
  14. openmind

    openmind Senior Member

    If you add:

    then you should be fine...
  15. NoisyShaun

    NoisyShaun Junior Member

    Brilliant, Thanks!

Share This Page