Forum Moderators: open
Edit...
Found a work around. I appended ?some-random-string to the end and it works perfectly.
[edited by: Nutter at 9:38 pm (utc) on Feb. 21, 2009]
<img src="same-image-name.jpg?12345678">
For Javascript, An easy way is to use the Date() and getTime() functions, often used for the id attribute of new windows (to insure a new window always opens instead of the same window with new content.) Even if you have multiple images on the same page, it's unlikely the current time will be the same as the last time the page was refreshed:
var day = new Date();
var id= day.getTime();
target_img.src= target_img.src+'?'+id;
(Might have my syntax wrong, but that's the idea)
I like the time idea and am going to put that in my bag of tricks for when I need a totally JS solution.