After doing a lot of searching on the Internet, it appears that there is no way to force the reload of a cached image via code. You can change the url by adding a random number or time to the url, but once you use the url without that it goes back to the original cached image. Only the user can force a reload of cached images, javascript, and css before the cache expires.
The only option that seems to work is using the actual artefact id to pull the thumbnails with "profileiconbyid".
]]>This worked / works for me:
//Set no caching for thumbnails...
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " 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've include this almost at the beginning of index.php file (which shows the thumbnails) - before calling / showing any of the thumbnails.
Maybe it'll work for you too.
Regards, Gregor
]]>Any thoughts on how to get the thumbnails to update immediately when changed?
So far, the only options I have been able to come up with are:
Hopefully, someone has a better idea of how to overcome this issue. Any thoughts?
]]>