On Monday, November 13, 2006 9:08 PM Matt Grimm <> said:

> 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.

You could possibly submit the same URL + a random string on the end.
This will make the browser thinks it's a new link.

http://www.domain.com/image.php?real_id=asdf&fake_id=adfasds

I don't know if removing and adding DOM elements works (because I've
never done that). But the random id will make the browser query the
server again for sure.


Chris.

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to