Yes, you can do it with JavaScript, it’s simple; assume that the name of your image 2.png and you are writing it dynamically to a web page the only thing you need to do is this:
var image = 'http://www.example.org/2.png?' + new Date().getTime();
To the browser, this is a new URL so it will download the image again but to the web server this is the same image regardless of what’s after the question mark.
Obviously you can adapt this to your own needs…
Hamid Alipour is a partner in Codehead, LLP with his wife, Tess. Hamid speaks 12 markup and programming languages [Yes, 12: PHP, CSS, Ajax, JavaScript, HTML/XHTML, Java, Python, C/C++, ASP, Visual Basic, Scheme and Action Script]; has a penchant for solving the unsolvable; an affinity for clean, hand-written code and is a Zend Certified 