How to display a constantly changing image file in a browser without refresh flicker?

前端 未结 3 1984
南旧
南旧 2021-02-05 12:56

I\'m displaying an image (from a file) on the browser using html... I have another program that keeps taking a screenshot of my screen and storing it as an image file \"image.jp

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-05 13:41

    Here a complete working example. Just configure url and refeshInterval. It uses Yannick's caching prevention and does not re-create the img object on every reload as suggested by Piotr.

    
    
    
    JavaScript Refresh Example
    
    
    
    
    
    
    

提交回复
热议问题