Hi All, I know most of you can help me... How do we prevent a page to be cached by a proxy or whatever? I know It doesn't matter what language... I think you can set it inthe header right? I'm afraid my colleague will have to use it for (yuck) asp(yuck) but could you please help us? I will want to use it for my zope pages 2. (anyone around that does know a lot about MySQLuserfolder?) Hope someone can help me (us) tnx! Greetz, Jamez!
Hi All, I know most of you can help me...
How do we prevent a page to be cached by a proxy or whatever?
I know It doesn't matter what language... I think you can set it inthe header right?
I'm afraid my colleague will have to use it for (yuck) asp(yuck) but could you please help us?
you have to set 2 headers: Expires: -1 Cache-Control: No-Cache in zope you set them with RESPONSE.setHeader('Expires','-1') RESPONSE.setHeader('Cache-Control','No-Cache') one tells proxies not to cache the other one tells browsers not to cache.
alex writes:
you have to set 2 headers: Expires: -1 Cache-Control: No-Cache
in zope you set them with RESPONSE.setHeader('Expires','-1') RESPONSE.setHeader('Cache-Control','No-Cache') The HTTP spec requires "Expires" to have a datetime value in a specific restricted format (RFC822 with timezone fixed to GMT). "-1" does not meet this specification.
Thus, setting "Expires" to "-1" may or may not work... Moreover, "Cache-Control" is defined in "HTTP 1.1" but not in "HTTP 1.0". Therefore, HTTP 1.1 compliant agents will understand it, while older agents (implemennting a superset of HTTP 1.0) may or may not understand it. "Expires" is already defined by HTTP 1.0. Dieter
participants (3)
-
alex -
Dieter Maurer -
James van der Veen