Return to Snippet

Revision: 15938
at July 21, 2009 09:26 by arnoldb


Initial Code
<img src=”image.jpg” id=”reloader” onload=”setTimeout(’document.getElementById(\’reloader\’).src=\’image.jpg?\’+new Date().getMilliseconds()’, 5000)” />

Initial URL
http://www.arnoldb.com/2009/06/06/refresh-an-image-with-a-single-line-of-code/

Initial Description
This will refresh an image based on time, all in one line of code. Change the image name/path and the time to refresh in milliseconds.

Initial Title
Single Line Image Refresh

Initial Tags

                                

Initial Language
HTML