If you want to defeat the cache you could try appending the current time 
as a query string:

img.src = fileName + "?" + (new Date()).getTime();

-blair

Matt Grimm wrote:
> What would be an ideal way to refresh an image whose src attribute is a
> script that dynamically generates the image? Would it be best to store
> the value of the src attribute in a variable, remove the img element
> from the DOM, and append a new image element with the same URL? In my
> quick tests, it seemed like the browser was just using the same image
> from the cache and I'm not sure how to get around that.
> 
> Thanks for anything!
> 
> m.
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to