Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers
| From: | Jason Greene | Date: | Wed, 29 Nov 2000 22:52:04 +0000 |
| Subject: | Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-39627@lists.php.net to get a copy of this message | ||
I agree, this shouldn't be automated by the php engine. There are too many variables to account
for.
As the web developer, this really isn't difficult to implement. Just make one call to
getallheaders() and respond header("HTTP/1.1
304 Not Modified") accodingly. You can then just include() the startup code in every page.
-Jason
----- Original Message -----
From: "Frank M. Kromann" <fmk@swwwing.com>
To: "Jordan Russell" <jr-phplist@quo.to>
Cc: <php-dev@lists.php.net>
Sent: Wednesday, November 29, 2000 12:19 PM
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.
>
> - Frank
>
>
>
>
> --
> 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
>