Hi, I am having a website where depending on the the action of the user the images changes on the page load. Now the image url stays the same as I use php to manipulate the image. Because the image is already cached the browser does not download it again. How can I tell the browser to download the image again? Thanks
Stephan, You can try to make the url dynamic attaching query string something like.. img src=xxx.php?t=".time() or send headers to ask the browser not to cache.. 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");
I'd personally use the headers myveed posted above to achieve that. You can also do that using .htaccess.