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

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
dwillen
Forum Newbie
Posts: 2
Joined: Tue Oct 05, 2004 7:26 pm

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

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I noticed you aren't specifying content-length in your image script. You may need to for IE to work correctly.
bling
Forum Commoner
Posts: 25
Joined: Mon Jul 12, 2004 12:44 pm

Post by bling »

You may get chastised for using IE on a Mac.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

it might be

Post 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
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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");
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
dwillen
Forum Newbie
Posts: 2
Joined: Tue Oct 05, 2004 7:26 pm

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply