Guest Anonymous Posted May 21, 2008 Posted May 21, 2008 Hey, well i have been trying to stop cache on one of my user authentication script but i have tried multiple ways, tried googled it. stuff i have been trying stuff like ...... <? header("Cache-Control: no-store, no-cache, must-revalidate"); ?> but got no where yet any one have an idea to have a no cache on a page? Thanks. Quote
Guest Anonymous Posted May 21, 2008 Posted May 21, 2008 Re: Stoping cache on a page? HTTP protocol ... set the time the page expires to be in the past. Quote
Guest Anonymous Posted May 22, 2008 Posted May 22, 2008 Re: Stoping cache on a page? Something like... <?php header("Cache-Control: no-cache, must-revalidate"); header("Expires: Fri, 1 May 2007 12:00:00 GMT"); ?> Right? Quote
Spudinski Posted May 23, 2008 Posted May 23, 2008 Re: Stoping cache on a page? Try header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); http://php.net/header#75507 Quote
Guest Anonymous Posted May 23, 2008 Posted May 23, 2008 Re: Stoping cache on a page? I used header("Cache-Control: no-cache, must-revalidate"); header("Expires: Fri, 1 May 2007 12:00:00 GMT"); which works fine. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.