I have set up a webcam at work which uploads a photo and refreshes the page every 5 minute开发者_JS百科s. However when there is some activity it uploads a new pic every few seconds. How can I refresh the page everytime a new pic is uploaded? Thanks, Mike
You must specify which technology you are using.Anyways if you used any modern technology then you can use timer which will refresh page after particular timestamp.
This is not trivial. There are ways to do "long polling" with the server pushing data to a JavaScript running in the browser (the technology is named COMET) but that's a lot of work to set up. It will also require server side programming.
Is a frequent refresh every few seconds, or alternatively a JavaScript/Ajax based solution that makes a quick check every few seconds, totally out of the question?
精彩评论