HTTP does not refresh

Report and discuss bugs here!
Mike Scott
Posts: 30
Joined: Fri Feb 15, 2013 6:47 pm

HTTP does not refresh

Postby Mike Scott » Mon Feb 18, 2013 12:59 pm

In the file /.yawcam/update.html there is no code to update the web page. So it just loads 1 static pic and stops. I added this, which refreshes just the pic not the whole page. by changing the var n, you can dynamically change the FPS

//Add id='pic' to the <img that holdsthe image. And add the js

<script type="text/javascript">
var n=1000 // will work as low as 100. in msec.
function refresh(){
document.images["pic"].src="out.jpg"
setTimeout("refresh()",n)
}
setTimeout("refresh()",1000)
</script>

Advertisement



malun
Site Admin
Posts: 1495
Joined: Sun Jan 04, 2004 1:29 pm

Re: HTTP does not refresh

Postby malun » Mon Feb 18, 2013 8:29 pm

Doesn't the image get updated when the page reloads?
What web browser are you using?

It works fine for me in the browsers I've tried:

In windows:
Chrome, Firefox, Opera, Internet Explorer

In OSX:
Safari

In Android:
Chrome

In iOS:
Safari
Chrome

/malun

Mike Scott
Posts: 30
Joined: Fri Feb 15, 2013 6:47 pm

Re: HTTP does not refresh

Postby Mike Scott » Mon Feb 18, 2013 9:52 pm

The image refreshes now I have some code to refresh. Problem was there was nothing to refreah the page. The code I added (above) has the advantage of just refreshing the img so there is no page flicker (as occures sometimes when refreshing the whole page), and if the page has a lot of other stuff on it, that will not get reloaded n x per sec (keeps the Kbps down and enables a [marginally] faster refresh rate)

z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Re: HTTP does not refresh

Postby z3r0c00l12 » Tue Feb 19, 2013 1:03 am

My update.html page has "<meta http-equiv=Refresh content="10">" to refresh every 10 seconds.

malun
Site Admin
Posts: 1495
Joined: Sun Jan 04, 2004 1:29 pm

Re: HTTP does not refresh

Postby malun » Fri Feb 22, 2013 12:50 am

Ah, yep. To get the javascript update: Use the stream output (and you can set it to 1 FPS if you want to).

/malun


Return to “Bugs”

Who is online

Users browsing this forum: No registered users and 18 guests