Page 1 of 1

IE can't help but to cache my dynamic images, aaarg!

Posted: Tue Oct 05, 2004 7:33 pm
by dwillen
Here is the testing copy of the page I'm working on: http://angrychemist.com

The images on the top and side are dynamically generated with gd each page load. The one on the left is just an img src= image, the one on the top is a background image in a table. The background image stays cached in IE 5.x for Mac (and probably other versions). I have tried adding no-cache headers, even hitting shift reload on the browser, but it still wont load a fresh copy. Any ideas? The non-background image works fine, and everything seems to work fine with Safari.

Thanks for any help. I can provide code if needed, but it doesn't seem like that is the problem.

Dan

Posted: Tue Oct 05, 2004 8:33 pm
by feyd
I noticed you aren't specifying content-length in your image script. You may need to for IE to work correctly.

Posted: Tue Oct 05, 2004 8:34 pm
by bling
You may get chastised for using IE on a Mac.

Posted: Wed Oct 06, 2004 3:12 am
by twigletmac
Could it just be an IE 5.x on Mac issue? I've just tested the site on Firefox (0.9) and IE 5 on Windows and it's working fine in both.

Mac

it might be

Posted: Wed Oct 06, 2004 3:43 am
by phpScott
The last time I did a big project for dealing with images and I had made a nice slick site that used heaps of javascript and iframes. Worked great on everyting I tested on including windows and linux based machines, however IE5.x for the MAC busted it. I had to go back and recode a bunch of the site because the majority of people where using IE5.x for Mac to view the site.
Dammit M$ can't even keep browsers the same across platforms.

You might have to do some browser checking to deal different code types to different browsers.

phpScott

Posted: Wed Oct 06, 2004 9:57 am
by pickle
Ya, it's probably an issue with just IE for Mac (blech). I've noticed that to absolutely stop caching on IE for Windows, you need 3 anti-caching headers. I'm not sure of the syntax but it's something like this:

Code: Select all

header("Expires: 0");
header("Pragma: no-cache");
Header("Content-Control: no-cache");

Posted: Wed Oct 06, 2004 5:19 pm
by dwillen
Thanks for your replies. I will just give up on Mac IE 5.x then. I no longer have a windows box to test things out on, but if it works fine then I am not too worried anymore.

Dan

Posted: Wed Oct 06, 2004 5:20 pm
by feyd
it doesn't really work fine.. IE on windows will have problems if the content-length header isn't sent with the images.