At 6:08 PM +0530 8/2/06, Manoj Singh wrote:
Hello all,

I am creating a a script in which a dynamic graph is generated through gd
library. The format of the picture is jpeg. Now the problem is that the
browser is caching the images and after updating also it is displaying the
older image.

Currently for clearing the cache i am using this code
<?php
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
?>

But this code is not working me. Please help me.

Regards
Manoj

Manoj:

I had a similar problem -- if memory serves me correctly, I solved it by appending a random string to the jpg, such as graph.jeg?id=<some random string>. The image tag won't process the addition and the browser treats it as a new image. I think this worked for most browsers, but I may be wrong.

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to