Re: 304 Not Modified header not working within a class

From: Date: Wed, 20 Jan 2010 06:10:38 +0000
Subject: Re: 304 Not Modified header not working within a class
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-301245@lists.php.net to get a copy of this message
ok, you might wanna re-ask on an apache list in that case.. On Wed, Jan 20, 2010 at 6:48 AM, Camilo Sperberg <unreal4u@gmail.com> wrote: > > > On Wed, Jan 20, 2010 at 02:33, Rene Veerman <rene7705@gmail.com> wrote: >> >> if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) AND >> strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified) { >> >> >> shouldn't that be >> >> strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $last_modified) >> >> ? > > Now that I think about it... yes; but I send the last modified header anyway > the first time (when $_SERVER['HTTP_IF_MODIFIED_SINCE'] == null): > header('Last-Modified: '.gmdate('D, d M Y H:i:s',$last_modified).' > GMT'); > > So if it isn't exactly equal, then the browser cache simply doesn't have the > latest version. It is impossible anyway that the browser can have a newer > version that doesn't previously exist on the server. > My best guess is that it doesn't affect the process: when I implement that > code in my class, it enters that part (meaning all the comparisons are ok) > but afterwards it keeps sending an "200 OK" header when I explicitly tell > Apache to send the "304 Not Modified" one. > > Greetings and thanks for sharing :) > > -- > Mailed by: > UnReAl4U - unreal4u > ICQ #: 54472056 > www1: http://www.chw.net/ > www2: http://unreal4u.com/ >

« previous php.general (#301245) next »