homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

caching of websites

Msg#: 4154605 posted 6:33 am on Jun 18, 2010 (gmt 0)


How does one guarantee that the latest changes to the website will be served to browsers instead of browser just using the cached version?

I mean, we look at news websites and we don't read old news everyday. We can trust our browsers that they are picking up the latest changes to the news website.

But when I have changed my website, my mate can't see the changes.
There must be some file or code you put in a website to "push" the browser to not serve the cached version, but get the latest version off the server.




WebmasterWorld Senior Member piatkow us a WebmasterWorld Top Contributor of All Time 5+ Year Member

Msg#: 4154605 posted 9:44 am on Jun 18, 2010 (gmt 0)

The following code in the header stopped Google caching my news page.

<meta name="ROBOTS" content="NOARCHIVE">

I did that many years ago and have never needed to re-address the issue so I am not 100% sure if it is most appropriate code but it works.


Msg#: 4154605 posted 5:31 am on Jun 19, 2010 (gmt 0)

Thankyou, I will learn about robots.



WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4154605 posted 7:10 am on Jun 19, 2010 (gmt 0)

send an expires header set to 0 (zero)
the method for doing this depends on your server or scripting language

or put this in the html head:
this second method is unreliable


Msg#: 4154605 posted 1:23 pm on Jun 21, 2010 (gmt 0)

Hi topr8.

I will go with your first method.
I'm using c# asp.net, and I can use javascript for clientside.
Where would I find more details on this method?
I'm going to google, "expires header" and see if I come up with something.

more info would be appreciated. also even a reference to a good book or website that talks about this stuff.



Msg#: 4154605 posted 9:35 pm on Oct 9, 2010 (gmt 0)

I have used the method:
and that usually seems to work. Recently I learned about this one though:
<meta http-equiv="cache-control" content="no-store" />

Supposedly it tells the browser to store the web page in its cache temporarily, but if you leave the site and come back it will load the fresh version again (instead of saving the cached version.) Anyone know anything about that?

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved