tags:

views:

20

answers:

2

I have set up a webcam at work which uploads a photo and refreshes the page every 5 minutes. 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

A: 

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.

Rupeshit
A: 

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?

Pekka