Force IE7 to use cache?
March 19, 2008 3:19 PM   Subscribe

Force IE7 to use cache?

I have a javascript preloader that loads a bunch of images used by my client's image-heavy web site. On Firefox and older IE, this works fine, but IE7 seems to ignore the fact that the images were preloaded, and this results in a very ugly load sequence with parts of the page appearing in patchwork fashion.

Can I force IE7 to use the images I just preloaded? I know about meta and http "no-cache" but what about the reverse?

Also, I am aware that individual cache settings are in play here.
posted by CaptApollo to Computers & Internet (4 answers total) 1 user marked this as a favorite
When you say "Can I force..." do you mean you-as-the-viewer or you-as-the-website-creator?
posted by Class Goat at 3:30 PM on March 19, 2008

You probably want to be looking at the Expires, Pragma and Cache-Control headers that the server is sending. It should be telling the client that it can use the images from cache and setting Expires in the future (if only an hour). Test it with something like LiveHTTPHeaders.
posted by idb at 3:37 PM on March 19, 2008

Response by poster: I mean me as the website creator.
posted by CaptApollo at 7:59 PM on March 19, 2008

Firstly, are you sure you haven't changed your own settings in IE7? A lot of web developers change from the default to discourage any caching to make testing easier.

If the images are hosted on Apache, it should be fairly easy to use .htaccess/httpdconf to send some Expires and Cache-Control headers for any images served from a particular folder, and that might do the trick.
Also check there's nothing unusual about the images that might be discouraging caching, e.g. some browsers won't cache files whose URLs have query strings.
posted by malevolent at 7:50 AM on March 20, 2008

« Older Should I work in a hotel?   |   Help me with budget software!! Newer »
This thread is closed to new comments.