[AWS] How to avoid caching?

Darren New dnew@san.rr.com
Wed, 12 Feb 2003 07:33:39 -0800


David Marceau wrote:

>>The easiest solution. I'll try it. I had no notice of this convention.
>>    
>>
Actually, "NPH" means "non-parsed headers". That is, the web server 
sends back exactly what it gets from the cgi script, letting the CGI 
script do things like send back invalid headers or the status line 
itself. It's possible that there are browsers that detect this sort of 
name but it's not part of the HTTP specification. 

In other words, this disables the cache on the *server*, not the *browser*.

>>>-read the http protocol docs and look for keywords cache & disable, add
>>>it to your code if you really have to.
>>>      
>>>
>>I have these located, I'll add them anyway (just in case) to my
>>templates.
>>    
>>
>Yes this is the best alternative.
>  
>

Also, set the "expires" header to a time in the past. I'm pretty sure 
the "cache" keyword is for proxies, not browsers. The "expires" header 
is what's supposed to control how long a browser holds onto the page.

>>it, the page doesn't refresh (until cache time expires).
>>
So include an expires header that says "right now".

>>I just have found that this problem is Opera specific: Explorer 6
>>reloads the pages. Both with default configuration.
>>    
>>
It could be a difference in configuration. Explorer could be set up to 
check every time and Opera could be paying attention to the expires header.