Re: Unsetting a header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Heyes wrote:
Maybe I'm being dense, but why not set it to what you want it to be? Clearing it is leaving the decision up to the browser which will not necessarily have the effect you want for all users.

Incidentally, it might not be possible if Apache is setting it. Not sure if PHP has the ability to override headers being sent by Apache.

The two have different effects. The Expires: header proclaims that the page is good for x hours/minutes/days etc. Whereas the browser can use the Last-Modified header to figure the staleness for itself. If its newer than the copy it has, it needs to download the newer copy.

I'm well-aware of what the headers are for, but you can construct expiry headers that match the last-modified header. As I said I'm fairly certain you will not be able in PHP to remove a header added by Apache. Given that you can't get rid of it your best option is to set it to a value that will minimise its effect.

Why can't you modify the Apache configuration to prevent it from adding this header? If not in httpd.conf then in a .htaccess file. If your host won't let you do that, switch to someone who will.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux