Click to See Complete Forum and Search --> : force refresh


PatrickLewis
02-28-2003, 12:43 PM
Is there a way to force the browser to refresh from the website instead of refreshing from the cache?

I have a page the load external files and need the page to refresh from the update external files instead of the cache.

I can fix it in my browser by changing the "check page against cache once" to always, but need to force it for other users.

Maybe a way to stop the browser from caching the page in the first place.

Thanks

pyro
02-28-2003, 12:48 PM
If you have PHP you can...

remember to rename to .php
<?PHP
header("Expires: ".gmdate("D, d M Y H:i:s")." GMT"); // Always expired
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");// always modified
header("Cache-Control: no-cache, must-revalidate");// HTTP/1.1
header("Pragma: nocache");// HTTP/1.0
?>

Insert the above at the very top of you pages...