I would like to reload an image which is constantly updated on the server. So far I have only tried:
setInterval(function(){
if ($("#stream").data("loaded")) {
$("#stream").attr("src", "http://keshira.com:8080/?action=snapshot&" + new Date().getTime());
}
},100);
<img id="stream" onload="$(this).data('loaded', 'loaded');" src="http://keshira.com:8080/?action=snapshot"/>
Unfortunately this also keeps refreshing the image every 100ms. My problem is that I would like to load new images as fast a possible. So using a larger time interval is no option. Any thoughts are highly appreciated.