Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Redirects and Cache-Control

kropotkin

2009-04-09

Replies: Find Java Web Hosting

Author LoginPost Reply
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
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.