The problem is that the browser caches the image after it is downloaded once, and the animation only starts when the image is fresh, and not when the browser extracts it from its cache.
, URL-, , , , .
" ".
gif :
function f(obj) {
obj.innerHTML = '<img src="images/ok.gif?timestamp=' + Date.now() + '">';
}
Date.now() , 1970 , , URL .
, ok.gif? timestamp = 1508487387065 - , ok.gif? timestamp = 1508487401817, , .