Reloading image on a page every minute.

C

CB

I've got a live camera image I'd like to make the browser window reload
the pic or at least the whole page every few minutes. What's the best
way to do this?
 
D

Disco Octopus

CB said:
I've got a live camera image I'd like to make the browser window
reload the pic or at least the whole page every few minutes. What's
the best way to do this?


<meta http-equiv="refresh" content="15; URL=this.html">




or


<script>
function reload() {
location = "this.html"
}
setTimeout("reload()", 1000);
</script>
 
L

Leif K-Brooks

CB said:
I've got a live camera image I'd like to make the browser window reload
the pic or at least the whole page every few minutes. What's the best
way to do this?

<p>Images are updated every minute. You may want to reload.</p>
 
C

CB

Thanks Disco! Actually, seems all I need is:

<meta http-equiv="refresh" content="15">
 
D

Disco Octopus

Thanks Disco! Actually, seems all I need is:

<meta http-equiv="refresh" content="15">



Actually, you may want to test that in some browsers, aas it 'may' break the
back button. good luck.
 
M

Mark Parnell

<meta http-equiv="refresh" content="15; URL=this.html">

What if your visitor doesn't want it to reload that often? (Think:
dial-up, or people using IE with more than one window open[1]). Plus,
some browsers have the option to disable meta refresh.
<script>
function reload() {
location = "this.html"
}
setTimeout("reload()", 1000);
</script>

Won't work for around 15% of your visitors.

To the OP: Much as you might not like it, Leif's solution is both the
best for your visitors and the most reliable.


[1] I hate the way IE brings the window to the front when a page
finishes loading.
 
M

Mark Parnell

<meta http-equiv="refresh" content="15; URL=this.html">

What if your visitor doesn't want it to reload that often? (Think:
dial-up, or people using IE with more than one window open[1]). Plus,
some browsers have the option to disable meta refresh.

Whoops, almost forgot - it breaks the back button too (thanks Disco).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top