Welcome to WebmasterWorld Guest from 23.22.220.37

Forum Moderators: incrediBILL

Message Too Old, No Replies

Forcing No Cache

     
4:44 pm on Jan 24, 2012 (gmt 0)

Preferred Member

10+ Year Member

joined:July 10, 2005
posts: 495
votes: 0


What's the proper way of forcing all visitors regardless of which browser their using...to have no cache of our home page ?

I'm currently using -

<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">

It only seems to work with Internet Explorer. Not so much with FireFox or Chrome. (I have to CTRL + REFRESH to get the non-cached version)

Also, it's an index.html page. (not php driven)

Any ideas ?

Thanks much
9:20 pm on Jan 24, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts:2143
votes: 7


You can add this:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

There is also this used by some (change dates accordingly)
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">
but I have never used it.

And if you do not want Google to archive it, add
<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE">

If you ever use .php or .asp pages, there are other options with those scripts.

ASP example in the header:

<%
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>

And here is a useful tutorial [mnot.net] on the subject.

Hope this all helps. :)

Marshall
12:29 am on Jan 25, 2012 (gmt 0)

Preferred Member

10+ Year Member

joined:July 10, 2005
posts: 495
votes: 0


Thanks Marshall, I'll add it as well.
2:39 am on Jan 25, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts:2143
votes: 7


Glad to help.

Marshall
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members