This page needs to refresh every given time because of a webcam stream. But when it does it jumps back up to the top of the page. Can this be prevented?
Hi Bart,
This is a good overview of using a webcam image in Freeway although there are a couple of things I would be inclined to change.
As you’ve noticed the meta refresh technique you currently have on the page not only refreshes the webcam image but jumps the user to the top of the page every ten seconds. This starts to get annoying after a while as the user attempts to read the text on the page. A much better solution is to use JavaScript to reload just the image.
The other thing I would avoid is to paste duplicate HTML and BODY tags into the Freeway page as these will invalidate the page code.
Here’s a slightly modified version of your page with the markup code restricted to just the image as well as the required Javascript to refresh the image; http://www.freewayactions.com/test/webcam-image/
This page needs to refresh every given time because of a webcam stream. But when it does it jumps back up to the top of the page. Can this be prevented?
Hi Tim, This was exactly the reason why I was asking and did not send out the article yet. The jumping and refreshing is very annoying. Thank you and your code does the trick. I have added your name and link to the article to thank you.