Re: [PHP] Unsetting a header
Richard Heyes wrote: FWIW, I found what was setting the cache headers - sessions. I may be able to use session_cache_limiter(). Not Sure. Further, I found this to be what I needed: session_cache_limiter('private_no_expire'); Cheers. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
FWIW, I found what was setting the cache headers - sessions. I may be able to use session_cache_limiter(). Not Sure. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
Sorry, I didn't articulate what I meant very well. What I meant was that you know the churn rate of your pages, so put in sensible expiry headers based on that info. Unfortunately I can't foresee when the pages are changed (it won't be me who changes them). But the better way to solve it is to edit the Apache configuration to stop it putting the headers in in the first place. Why can't you do that? I could. I just don't know how to unset a header. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
Richard Heyes wrote: I'm well-aware of what the headers are for, but you can construct expiry headers that match the last-modified header. If I do that the Expiry: header will be in the past and the page will be considered expired. Sorry, I didn't articulate what I meant very well. What I meant was that you know the churn rate of your pages, so put in sensible expiry headers based on that info. But the better way to solve it is to edit the Apache configuration to stop it putting the headers in in the first place. Why can't you do that? -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
I'm well-aware of what the headers are for, but you can construct expiry headers that match the last-modified header. If I do that the Expiry: header will be in the past and the page will be considered expired. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
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
Re: [PHP] Unsetting a header
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. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
Richard Heyes wrote: [EMAIL PROTECTED] wrote: Try this never gives me a problem. I use it to keep proxy servers from caching. But I want the page to be cached... 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. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
Have you tried setting the value to FALSE, NULL, or something else? Yes, nada I'm afraid. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
[EMAIL PROTECTED] wrote: Try this never gives me a problem. I use it to keep proxy servers from caching. But I want the page to be cached... -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
Let me reiterate, I want this page to get cached, but not based on an Expires: header. Rather a Last-Modified header. Have you tried setting the value to FALSE, NULL, or something else? I recall having read something along those lines. I'll see if I can find it again, meanwhile you could experiment a little. Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting a header
Try this never gives me a problem. I use it to keep proxy servers from caching. Yes but I want to unset an Expires: header and not give a any value. 1. PHP (I believe) is setting an Expires: header. 2. The Expires: header is causing the page to be cached too long, Longer than the Last-Modified: header would allow. 3. Setting the Expires: header to garbage, eg: Expires: none causes no caching to occur at all. Let me reiterate, I want this page to get cached, but not based on an Expires: header. Rather a Last-Modified header. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unsetting a header
Try this never gives me a problem. I use it to keep proxy servers from caching. Richard L. Buskirk -Original Message- From: Richard Heyes [mailto:[EMAIL PROTECTED] Sent: Sunday, October 21, 2007 7:55 AM To: PHP General List Subject: [PHP] Unsetting a header Does anyone know of a way to unset a header? I have an Expires: header that I believe Apache is setting, and I don't want it. Thanks. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unsetting a header
Does anyone know of a way to unset a header? I have an Expires: header that I believe Apache is setting, and I don't want it. Thanks. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php