Re: 304 Not Modified
| From: | Christian Reiniger | Date: | Thu, 06 Sep 2001 10:25:49 +0000 |
| Subject: | Re: 304 Not Modified | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66194@lists.php.net to get a copy of this message | ||
On Thursday 06 September 2001 12:28, ermannov@libero.it wrote:
> The problem is that PHP has to generate the Last-Modified header, so it
> can't send only the "HTTP/1.0 304 not modified", that is what I want.
You send the Last-Modified on the requests where you *do* send a page
back (i.e. those not generating a 304).
> I think Last-Modified relies on the last modified date and time of the
> file, but this is irrilevant in server-generated pages.
No. You know when you last modified the page after all:
> > > So:
> > > if($last_modified <= $last_access)
> > > {
> > > header("304 Not Modified);
> > > exit;
> > > }
> > > else
> > > {
> > > /* code genertating the new page */
> > > }
--
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)
/* you are not expected to understand this */
- from the UNIX V6 kernel source