On Tue, 16 Nov 1999, Eric Cholet wrote:
> Date: Tue, 16 Nov 1999 17:06:30 +0100
> From: Eric Cholet <[EMAIL PROTECTED]>
> To: 'Geschke Steffen' <[EMAIL PROTECTED]>
> Cc: 'ModPerl Mail List' <[EMAIL PROTECTED]>
> Subject: RE: Does no_cache really deny caching?!
>
> > 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);
I'm curious how to get this work with $r->internal_redirect ?
If I have handler /picture/random which does internal redirection
to random image (as RandPicture module from the Book) I need to
provide no_cache header to avoid caching. But I dont' know if
the above trick will works.
Regards,
Oleg
>
> > Steffen
>
> --
> Eric
>
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83