> Hello,
> 
> I would like to deny caching of pages which are under access control.
> So, I looked at no_cache and browsed through the http header
> produced by this method.
> 
> As far as I discovered, no_cache(1) behaves like the A option of
> mod_expires. The httpd header field looks like
> 
> Expires:   <current date and time>
> 
> I am not able to manage that all proxies set the time correclty. Most likely
> the time settings are different because only a few servers are connected
> to an NTP time source. This is even more important if a few servers
> doesn't support daylight saving time correctly.
> 
> Wouldn't it be better to behave like the M option of mod_expires, e.g.
> to set the last modification date or maybe the hard way:
> set an artificial date like 01/01/1980 (that's what I did for myself via
> $r->header_out)?!

I raised this issue on this list about a year and a half ago, and Ask
forwarded it to the Apache Group, where it was rejected because the semantics
of no_cache can't just be altered this way. You can lookup the exact reason
in the archives :-)

This works for me:

  my $headers = $r->headers_out;
  $headers->{'Pragma'} = $headers->{'Cache-control'} = 'no-cache';
  $r->no_cache(1);
 
> Steffen

--
Eric

Reply via email to