Re: php shows the cached page always

From: Date: Tue, 08 Apr 2003 17:23:18 +0000
Subject: Re: php shows the cached page always
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142922@lists.php.net to get a copy of this message
You can try using cache headers, but browsers seem to disagree about how they should work and they're shaky at best. I reccomend you use something like his at the top of the page (won't work with post [or get, but that can be easily modified] data!): if(!isset($_GET['nocache'])){
    header("Location: http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?nocache=".mt_rand(1,10000));
} Denis L. Menezes wrote:
Hello friends, I always get the PHP cached page. Then I always have to click 'Refresh' button on the browser to get the latest page. Also sometimes, even when I go to a new computer and look for my php page for the first time, it still shows an old page(page with the last queried data and not the latest query results). What should I do for the fresh php page to be seen everytime without the need to "refresh" the page? Thanks Denis
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#142922) next »