1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Page Auto Refresh

Discussion in 'HTML & Website Design' started by Deepprogrammer, Nov 1, 2012.

  1. #1
    Hey,

    I am working on a page with several webcam shots that I need to automatically refresh. Obviously this can be done with the meta tag or javascript however:

    Some of the webcams shots load at different times, and some take up to a minute to come back. I would like the page to refresh every 10 seconds whether or not the page has "completely" loaded, is this possible?

    Thanks in advance for any help.
     
    Deepprogrammer, Nov 1, 2012 IP
  2. rome2213

    rome2213 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Refresh the page every 10 seconds with Javascript's setInterval function.

    <script>
    setInterval(function() { window.location = "[I]website_URL[/I]" }, 10000);
    </script>
    Code (markup):
     
    rome2213, Nov 2, 2012 IP
  3. jutipum

    jutipum Guest

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    To have the page automatically refresh itself every x seconds, use a tag like this:

    <META HTTP-EQUIV="REFRESH" CONTENT="5">
    Code (markup):
    This tells the browser to refresh the page (HTTP-EQUIV="REFRESH"), and that it should do so every five seconds (CONTENT="5").
     
    jutipum, Nov 2, 2012 IP