How to force browsers to clear cache?

Force IE7 to use cache?

  • 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.

  • Answer:

    When you say "Can I force..." do you mean you-as-the-viewer or you-as-the-website-creator?

CaptApollo at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

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 http://ask.metafilter.com/84583/How-do-I-find-the-values-being-sent-to-a-website-from-my-computer.

idb

I mean me as the website creator.

CaptApollo

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.

malevolent

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.