Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing Browser Cache 1

Status
Not open for further replies.

datamasher

Technical User
Dec 31, 2001
69
GB
Hi everyone,
is it possible to prevent a browser cacheing an html page? I have tried several <meta tag> methods but none of them seem to work.

I have to update a particular web page almost daily and if visitors don't refresh the page they don't see the update.

Any help much appreciated

Steve
datamasher
 
Hi

Is possible. What kind of [tt]meta[/tt] tags have you tried ?

Theoretically you need two HTTP response headers :
[ul]
[li][tt]Cache-Control: no-cache[/tt] - HTTP/1.1[/li]
[li][tt]Pragma: no-cache[/tt] - HTTP/1.1[/li]
[/ul]


Feherke.
feherke.ga
 
Hi Feherke,
Thanks for your prompt reply. I've included the following meta tags

<meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-control" content="no-cache">

and this achieves what I was looking for.

Again, Many thanks

Steve
datamasher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top