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 / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Forcing No Cache

 4:44 pm on Jan 24, 2012 (gmt 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)

You can add this:


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

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. :)



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

Thanks Marshall, I'll add it as well.


 2:39 am on Jan 25, 2012 (gmt 0)

Glad to help.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
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