Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers
| From: | Frank M. Kromann | Date: | Wed, 29 Nov 2000 20:19:38 +0000 |
| Subject: | Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39625@lists.php.net to get a copy of this message | ||
>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