Re: [fastCache] 304

From: Date: Tue, 23 Jul 2002 09:41:11 +0000
Subject: Re: [fastCache] 304
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7896@lists.php.net to get a copy of this message
Hello, On Tue, 23 Jul 2002 10:09:00 +0200 "Olivier Vanhoucke" <root@nanouk.org> wrote: > It's quite easy to use a HTTP 304. I think something like this could work > (haven't tested) > jpcache system for 304 must be better ... > > Olivier > > $get = ''; > foreach ($_GET as $key => $value) { > $get .= $key.'='.$value.'&amp;'; > } A serialize is faster :), same for post or whatever you want :) > $id_etag = $_SERVER['PHP_SELF'].'?'.$get.' '.date('d/m/Y > H:i:s', > filemtime($_SERVER["SCRIPT_FILENAME"])); > $headers = getallheaders(); ... > header('Etag: "'.$id_etag.'"'); > header('Refresh: 86400'); A result data can change when the script did not. That s the role of a garbage to determine if a data is still valid or not. IMHO, this is not a good solution for the 304. Except if we need a dynamic to static pages converter :). pa

« previous php.pear.dev (#7896) next »