Refresh image with a new one at the same url

后端 未结 19 3301
南旧
南旧 2020-11-21 22:00

I am accessing a link on my site that will provide a new image each time it is accessed.

The issue I am running into is that if I try to load the image in the backgr

19条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-21 22:36

    I improved the script from AlexMA for showing my webcam on a web page wich periodically uploads a new image with the same name. I had issues that sometimes the image was flickering because of a broken image or not complete (up)loaded image. To prevent flickering I check the natural height of the image because the size of my webcam image did not change. Only if the loaded image height fits the original image height the full image will be shown on page.

      

    Webcam

    webcam image

提交回复
热议问题