Welcome to WebmasterWorld Guest from 54.167.86.211

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

caching of websites

caching

     
6:33 am on Jun 18, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 2, 2009
posts:68
votes: 0


Hi

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.

david.
9:44 am on June 18, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 5, 2006
posts:3284
votes: 12


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.
5:31 am on June 19, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 2, 2009
posts:68
votes: 0


Thankyou, I will learn about robots.

David.
7:10 am on June 19, 2010 (gmt 0)

Senior Member

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

joined:Apr 19, 2002
posts:3171
votes: 8


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:
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
this second method is unreliable
1:23 pm on June 21, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 2, 2009
posts:68
votes: 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.

regards.
david.
9:35 pm on Oct 9, 2010 (gmt 0)

New User

5+ Year Member

joined:Oct 9, 2010
posts: 12
votes: 0


I have used the method:
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
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?
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members