Why IE refuse to cache redirected image?

This is a discussion on Why IE refuse to cache redirected image? within the PHP Language forums, part of the PHP Programming Forums category; Is there anyway to get IE to cache a redirected image? For example, I have an page with the following: &...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-07-2004
Samuel
 
Posts: n/a
Default Why IE refuse to cache redirected image?

Is there anyway to get IE to cache a redirected image? For example, I have
an page with the following:

<html><body>
<img src=http://site1.com/redir.php?id=12>
</body></html>

The image is redirected to a different location through a script. If I don't
redirect and just point to the final image, IE caches the image properly.
Why is Internet Explorer not caching my image? Mozilla and Opera works
correctly. See the headers below
(today's date is Oct 5).


+++GET 1+++
GET /redir.php?id=12 HTTP/1.1
Accept: */*
Referer: http://site1.com/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322)
Host: site1.com
Connection: keep-alive


+++RESP 1+++
HTTP/1.1 302 Found
Date: Tue, 05 Oct 2004 18:06:46 GMT
Server: Apache
Accept-Ranges: bytes
Location: http://site2.com/real.php?id=12
Content-Encoding: gzip
Cache-Control: max-age=86400
Expires: Wed, 06 Oct 2004 18:06:46 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8


+++GET 2+++
GET /real.php?id=12 HTTP/1.1
Accept: */*
Referer: http://site1.com/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322)
Host: site2.com
Connection: keep-alive


+++RESP 2+++
HTTP/1.1 200 OK
Date: Tue, 05 Oct 2004 18:10:35 GMT
Server: Apache
Accept-Ranges: bytes
Cache-Control: max-age=604800, s-maxage=604800
Expires: Tue, 12 Oct 2004 18:10:35 GMT
Content-Length: 3234
Connection: close
Content-Type: image/jpeg





Reply With Quote
  #2 (permalink)  
Old 10-07-2004
Colin McKinnon
 
Posts: n/a
Default Re: Why IE refuse to cache redirected image?

Samuel wrote:

> Is there anyway to get IE to cache a redirected image? For example, I have
> an page with the following:
>


Browsers shouldn't cache negotiated content. What they should do if an
'expires' header is sent....? Solution would be to full the browser into
thinking it's not negotiated content by embedding the parameters in the
path and using mod_rewrite or a custom 404 handler to convert back to the
real php script + parameters.

HTH

C.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:45 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0