I have multiple upload form on the same page to allow the user to upload images. On postback I process the image uploaded and display it as a thumbnail just beside the correspondant upload form. The problem is that the image displayed is not the new one but the old one (probably get from cache).
If I upload a new picture that doesnt exists on the system, I see it immediatly.
Same thing if a delete one of the picture, it disappeared immediatly.
The problem came when I overwrite an existent picture.
I tried bunch of things like :
<meta http-equiv="Expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
<meta http-equiv="Pragma" content="no-cache">
or in php :
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);
Please see the attach files, one is the html result, the other the php code to understand the logic of my page.
Thanks a lot!