In our experience the only thing that guarantees no cacheing is returning
302. Also appending a query string (even an empty one) to the redirect URI
seems to make it even more solid.
So in your script you would build up your destination URI, append
'?foo=bar' to the end of it, and return it as a redirect. That way not
even MSIE will cache it.
HTH,
Nick
On Fri, 26 May 2000, Tom Mornini wrote:
> I have written a handler for delivering select images for a particular
> class of URIs based upon a database item that the user sets in advance.
> This allows us to "skin" some HTML allowing the user to select their look
> of choice.
>
> The problem I have is that IE5 (and perhaps other browsers and versions)
> but NOT Netscape 4.x have absolutely no respect for cache-control.
>
> My code does this:
>
> $r->no_cache(1);
>
> # some code to calculate a date 10 years ago (!) goes here...
>
> $r->header_out(
> 'Expires' => "$day_text, $day $mon_text $year $hour:$min:$sec GMT"
> );
>
> $r->send_http_header($subreq->content_type);
>
> And the HTTP headers via Lynx look like this:
>
> HTTP/1.0 200 OK
> Date: Fri, 26 May 2000 08:58:38 GMT
> Server: Apache/1.3.12 (Unix) mod_perl/1.23
> Pragma: no-cache
> Cache-control: no-cache
> Expires: Tue, 29 May 1990 1:58:38 GMT
> Content-length: 1332
> Content-Type: image/gif
>
> But IE5 still caches the damn things! Does anyone have a suggestion?
> Please note that I don't have the ability to modify the IMG SRC
> dynamically since the HTML resides on our customers' servers.
>
> --
> -- Tom Mornini
> -- InfoMania Printing and Prepress
>
>
- nick