RE: [PHP-DEV] PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers
| From: | Sam Liddicott | Date: | Thu, 30 Nov 2000 10:13:00 +0000 |
| Subject: | RE: [PHP-DEV] PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39685@lists.php.net to get a copy of this message | ||
I support Jordan for this reason:
A web site may consist of many "static" pages and a some dynamic pages, but
also use sessions. In order for the session id (the get-mode session id) to
be retained through static pages they will have to be parsed by php to
adjust the <a href="...> tags.
Most of these pages *will* be static; why have to add lots of (complex) code
to the page in order to make caching work?
[I know session id's are also supported in the path as in
http://blah.com/x=sessionid/my/path but most
people don't know that]
Sam
> -----Original Message-----
> From: Jordan Russell [mailto:jr-phplist@quo.to]
> Sent: Wednesday, November 29, 2000 09:37
> To: Frank M. Kromann
> Cc: php-dev@lists.php.net
> Subject: Re: [PHP-DEV] PHP 4.0 Bug #8017: PHP ignores
> "If-Modified-Since" headers
>
>
> > >When you have a client that visits a page 10 times a day,
> and the content
> > >never changes, the server is sending that web page 9 times
> more than
> > >necessary. If the script were to send a Last-Modified
> header, and PHP
> > >handled If-Modified-Since appropriately, the page would
> only be sent once
> to
> > >the client; subsequent requests would be pulled out of the
> web browser
> > >cache. Not only does this conserve bandwidth on the server
> end, it also
> > >makes the page come up significantly faster for the
> client. So it's a
> > >win-win situation for everyone.
> >
> > In other words, You require the developer to send an extra
> header in order
> for the engine to take care of caching. Why cant the
> developer send the
> extra header and make checks accordingly ? Most of the work
> will be done in
> the script anyway. You need to do this in the script to
> dertermine if the
> content of databases or other systems has changed. As a
> developer you will
> also be able to exit the script after sending the 304 header.
> You dont need
> any extra php functions to handle this.
>
>
> The reason why I think it should be built-in is because parsing
> If-Modified-Since is complicated -- the HTTP spec allows a number of
> different date formats. I think it's unreasonable to expect every PHP
> develeper to write his own If-Modified-Since parser (or
> obtain a third-party
> one) if they want to use Last-Modified-style caching. Not
> only that, it
> would run a whole lot faster in native C.
>
> I've produced a working patch for PHP 4.0.3pl1 which I'll
> post shortly...
>
> Jordan Russell
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>