Tuesday, March 08, 2011

How to reload/refresh an element(image) in jQuery - Stack Overflow

How to reload/refresh an element(image) in jQuery - Stack Overflow: "t sounds like it's your browser caching the image (which I now notice you wrote in your question). You can force the browser to reload the image by passing an extra variable like so:

d = new Date();
$('#myimg').attr('src', '/myimg.jpg?'+d.getTime());"