I have thumbnail PHP script what remakes thumbnails. All is working fine until it loads the thumbnail, the browser fails to reload the image from the server and displays the old thumbnail. I have tried following tricks:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
As well as meta tags:
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Expires" content="Tue,01 Dec 1990 06:30:00 GMT">
Question is, am I doing something wrong or there is another method? I know of adding "?randomnumber" trick to the end of the image. However, I really do not want to use it, since it would mean browser caching large amounts of images as well as making things look messy. And I have no real way to get thumbnail edit date reliably.