Re: Getting IE6 to honor caching directives and CACHE contents...
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Mon, 09 Mar 2009 07:39:43 -0400
Daniel Smedegaard Buus wrote:
Hey hey :)
My application is feeding some images through PHP. I try to set headers to make sure that the browser caches the images for 10 minutes. This works fine except in, hold your breath, Internet Explorer.
For some reason, it keeps re-requesting the images, resulting in mouse-over image swaps "flickering" and, of course, unnecessary load on the web server.
These are the headers I set which works for all browsers I've tried except IE:
// We need to set a public cache control and put a "last modified" header,
// otherwise we don't receive the "if modified since" header on subsequent
// re-requests:
header('Cache-Control: public, max-age=600');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Expires: 600');
header('Content-Type: '.$mime_type);
I tried adding [ header('Age: 1'); ] and changing the expires header to [ header('Expires: '.gmdate('D, d M Y H:i:s', time()+600).' GMT'); ], this doesn't work either, and AFAICT this syntax is wrong anyway if you ask w3.org.
Finding info on this on Google is a bit difficult, because as we all probably know, the most common problem is not to get IE to CACHE content but to get it to NOT cache content, which is the opposite of my problem ;)
Anybody got any ideas?
TIA,
Daniel :)
Wrong place. This is an IE problem, so try an IE newsgroup.
But you'll find cache headers and other browser directives are only recommendations. There is no way to force the browser to follow them.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: Getting IE6 to honor caching directives and CACHE contents...
- From: Willem Bogaerts
- Re: Getting IE6 to honor caching directives and CACHE contents...
- From: Daniel Smedegaard Buus
- Re: Getting IE6 to honor caching directives and CACHE contents...
- References:
- Getting IE6 to honor caching directives and CACHE contents...
- From: Daniel Smedegaard Buus
- Getting IE6 to honor caching directives and CACHE contents...
- Prev by Date: Getting IE6 to honor caching directives and CACHE contents...
- Next by Date: Re: Getting IE6 to honor caching directives and CACHE contents...
- Previous by thread: Getting IE6 to honor caching directives and CACHE contents...
- Next by thread: Re: Getting IE6 to honor caching directives and CACHE contents...
- Index(es):
Relevant Pages
|