This is a multi-part message in MIME format.
------=_NextPart_000_0049_01C9B945.2E5F0170
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi
I am trying to use:
$headers =3D $r->headers_out;
$r->no_cache(1);
$headers->set( Location =3D> 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
------=_NextPart_000_0049_01C9B945.2E5F0170
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16809" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to use:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>$headers =3D =
$r->headers_out;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$r->no_cache(1);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$headers->set( Location =
=3D> url );
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>return REDIRECT.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The first problem is this does not set =
the
Cache-Control header.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>If instead of the redirect I output =
some content
(200 ) then it does, correctly.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is there some reason why this may be? I =
couldn't
see anything in our Apache configuration files where this is set
up.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Second question:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Does it make sense to try to set =
Cache-Control with
a redirect anyway?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>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? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Many thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Justin =
Wyllie</FONT></DIV></BODY></HTML>
------=_NextPart_000_0049_01C9B945.2E5F0170--
