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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reload

Status
Not open for further replies.

wuxapian

Programmer
Jun 13, 2001
52
GB
Hi all,

Does anyone know if there is a quick and easy way to force the browser to load a fresh copy of a html page rather than a cached copy (as in the setting: Every visit to the page).

TIA
Wux.
 
You mean programatically or manually??
manually you can press Ctrl+F5 and that will force the browser to get a fresh copy from the server.

grtfercho çB^]\..
"Imagination is more important than Knowledge" A. Einstein
 
To do it programatically, you need to add a no-cache section to the http headers. Try the following in php:

Code:
<?php
  Header(&quot;Cache-Control: must-revalidate&quot;);

  $offset = 60;
  $ExpireString = &quot;Expires: &quot; . gmdate(&quot;D, d M Y H:i:s&quot;, time() + $offset) . &quot; GMT&quot;;
  Header($ExpireString);
?>

www.keteracel.com
banner-small.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top