Whenever a site redesign goes live I find myself having to press Shift + Refresh in order to reload the images that were cached. Is there a way to force the browsers to do this when a site redesign goes live, so that the user sees the full new site using the new CSS and images without any glitches?
I think it involves the HTTP expires header but I’m not familiar with how it works?
And is it also the best, most widely supported method out there?
Thanks,
If you disable browser caching (if the browser heeds the request), then every image and every CSS and Javascript file will be downloaded again with every page view. You could set a expires header for a period of say, a few minutes, so you will not be wasting server resources and people’s time making them download every component on every view. You can see this for ideas and read the comments section for examples. You did not mention which web server you are using or scripting language or anything else.