Forum Moderators: mack

Message Too Old, No Replies

How do I avoid my webpage from getting into browser cache

         

lohia anirudh

9:57 am on Feb 5, 2007 (gmt 0)

10+ Year Member



<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

I have added these on the header of my website. But I am not able to prevent .html files from getting into browser cache. What can I do about it?

phranque

10:40 am on Feb 5, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



2 things to consider:

1 - in some cases you also need to specify:
Cache-Control: private
to prevent proxy (or any shared) cacheing.

2 - the meta http equiv tags are actually http header information hidden within an html document.
in some cases browsers don't recognize the meta http-equivs and proxies rarely read the html so they almost never process the meta http-equivs.
the only way to be sure is to write the http headers directly rather than rely on browser support to extract the from html tags.