Got a webpage that allows a user to replace a picture of their holiday cottage on one of my websites. Once the image is uploaded the user is redirected to another webpage which shows them the picture. However, when the user is redirected the webpage shows the original image, not the new one. I want them to see the new one so they can visually check that they are happy with the new picture.
This problem only happens on Internet Explorer. In Other browsers, such as Firefox, the page that the user is redirected to shows the new image, not the original one.
I have the following HTTP headers set:
header("Date: ".gmdate('D, d M Y H:i:s \G\M\T', time()));
header("Last-Modified: ".gmdate('D, d M Y H:i:s \G\M\T', time()));
header("Expires: Mon, 20 Dec 1998 01:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header( "Pragma: no-cache" );
I have the following headers set:
<META HTTP-EQUIV="EXPIRES" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="-1">
I have also placed a second "Head " section at the bottom of the page (as per Microsoft's recommendation to preventing page Cache) with the same values as above.
I have even tried modifying the .htaccess file but the changes I made caused the page to crash. I added:
ExpiresByType image/jpg A0
But regardless of these measures the orginal images on the page are always cached, even if the page itself is not. Anyone have any other ideas how I can prevent the images being cached in ie? It's driving me mad!!!!