0

When we place a new picture for an item that is already on our site, the picture that appears onto our site is still the old image. We need to do a hard refresh to get the new image to appear. Is there a way to refresh the cache when a new image is placed onto our site so that the new image will appear after changing the picture? This would need to be done in the browser cache as well as the website cache.

  • Possible duplicate of [Force browser to clear cache](https://stackoverflow.com/questions/1922910/force-browser-to-clear-cache) – treyBake Oct 16 '19 at 09:41
  • with a potential 2nd dupe: https://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming – treyBake Oct 16 '19 at 09:41

1 Answers1

0

You can solved this problem by clearing the browser cache. If a file is to be checked several times in a script, you probably want to avoid caching to get the correct results. To do this, use the following code

header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Content-Type: application/xml; charset=utf-8");

V77
  • 1
  • 2