Update Viewer.js
Update Viewer.js

The initial fix didn't work out (misunderstanding about the inner workings of requestAnimationFrame() and "sleep()" on my side). I now propose a different fix. I added the option "interval" to program an update interval and therefore the load. In addition instead of the initial call to draw, I used setInterval() to program a periodic call to draw. To avoid having always the same picture in the cache, I reset the image.src at the end of the draw function. Therefore the browser has one this.interval to load a new image. For my Mozilla setup this works quite well and stable now. I haven't tested it on Chrome, Safari or MSIE.
wintermuteger/mjpegcanvasjs,GT-RAIL/mjpegcanvasjs