[jQuery] Refresh an image with dynamic src URL?

[jQuery] Refresh an image with dynamic src URL?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=171030506-14112006><FONT face="Trebuchet MS"
size=2>No, because the URL stays the same, but based on some database info, the
image that gets generated will be different.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=171030506-14112006><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=171030506-14112006><FONT face="Trebuchet MS"
size=2>m.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com] <B>On Behalf Of </B>Glen
Lipka<BR><B>Sent:</B> Monday, November 13, 2006 8:24 PM<BR><B>To:</B> jQuery
Discussion.<BR><B>Subject:</B> Re: [jQuery] Refresh an image with dynamic src
URL?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Is this not working for you?</DIV>
<DIV>$("img.whatever").attr("src","newurl.gif");</DIV>
<DIV> </DIV>
<DIV>Glen<BR><BR> </DIV>
<DIV><SPAN class=gmail_quote>On 11/13/06, <B class=gmail_sendername>Matt
Grimm</B> <<A href="mailto:mgrimm@gci.com">mgrimm@gci.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">What
would be an ideal way to refresh an image whose src attribute is a<BR>script
that dynamically generates the image? Would it be best to store <BR>the value
of the src attribute in a variable, remove the img element<BR>from the DOM,
and append a new image element with the same URL? In my<BR>quick tests, it
seemed like the browser was just using the same image<BR>from the cache and
I'm not sure how to get around that.<BR><BR>Thanks for
anything!<BR><BR>m.<BR><BR>_______________________________________________<BR>jQuery
mailing list<BR><A href="mailto:discuss@jquery.com">discuss@jquery.com
</A><BR><A
href="http://jquery.com/discuss/">http://jquery.com/discuss/</A><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/