perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Wyllie" <enquir...@mms-oxford.com>
Subject Redirects and Cache-Control
Date Thu, 09 Apr 2009 17:58:33 GMT
Hi

I am trying to use:

$headers = $r->headers_out;
$r->no_cache(1);
$headers->set( Location => url  ); 
return REDIRECT.

The first problem is this does not set the Cache-Control header.

If instead of the redirect I output some content (200 ) then it does, correctly.

Is there some reason why this may be? I couldn't see anything in our Apache configuration
 files where this is set up.

Second question:

Does it make sense to try to set Cache-Control with a redirect anyway?

If url1 is requested and the redirect is to url2. What is the browser/proxy being told not
to cache - url1 or url2? Since it is url2 in the response headers surely url2? 

Many thanks

Justin Wyllie
Mime
View raw message