how to refresh the animated radar automatically

  • 1
  • Problem
  • Updated 2 years ago
  • (Edited)
I need some help, the weather radar I have does not automatically update. Is there a way to do this? below is the coding for a local site I used in my station at work. I know the codes isn't perfect and has errors but it works for what I am trying to do. We leave it up 24/7 because our station alerting uses it as well. If I could just get the radar to refresh it would be excellent. Any idea?



<!DOCTYPE Html>

 <title>Station 47</title>
<body> 
           <body link="black" vlink="black" bgcolor="DarkRed">
               <center><font face="Times New Roman" size="6"><marquee behavior="scroll" direction="left">Naval District Washington Fire Department Station 47 </marquee>
                  <table border="0">

<tr>
   <td><iframe id="Iframe1" frameborder="0" scrolling="no" width="2360" height="930"  src="https://webview.active911.com/client/"></iframe>;

</tr>

<tr>

   <td><iframe id="Iframe2" src="http://www.chart.state.md.us/video/video.php?feed=7401e25800f700d700437a45351f0214"; width="400" height="400" Frameborder="0" scrolling="no"></iframe>
     <iframe id="Iframe3" src="
http://www.chart.state.md.us/video/video.php?feed=7e01ec5800f700d700437a45351f0214"; width="400" height="400" Frameborder="0" scrolling="no"></iframe>
       <iframe id="Iframe4" src="
http://www.chart.state.md.us/video/video.php?feed=7901e75800f700d700437a45351f0214"; width="400" height="400" frameborder="0" scrolling="no"></iframe>
        <iframe id="Iframe5" src="
http://www.chart.state.md.us/video/video.php?feed=6100bdd12e83001c00503336c4235c0a"; width="400" height="400" frameborder="0" scrolling="no"></iframe>
          <iframe id="Iframe6" src="
http://www.chart.state.md.us/video/video.php?feed=4900c5b02e84001c00503336c4235c0a"; width="400" height="400" frameborder="0" scrolling="no"></iframe>
            <iframe id="Iframe7" src="
http://api.wunderground.com/api/XXXXXXXXXXX/animatedradar/q/MD/Annapolis.gif?&width=415&...; width="330" height="400" frameborder="0" scrolling="no"</iframe></td>
</tr>
</body>
</html>


Photo of Robert Wahrenbrock

Robert Wahrenbrock

  • 3 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Brandon

Brandon

  • 29 Posts
  • 7 Reply Likes
This may have to do with client side caching, does it refresh if you use CTRL+F5? if so this may help:

put this in the <head> of your page.
<meta http-Equiv="Pragma" Content="no-cache" />
<meta http-Equiv="Expires" Content="0" />
<meta http-Equiv="Cache-Control" Content="no-cache" />
(Edited)
Photo of Robert Wahrenbrock

Robert Wahrenbrock

  • 3 Posts
  • 0 Reply Likes
Brandon,

It does refresh with CTR F5 I have pasted the code in the head. How often does the loop get refreshed? I will am going to give a while and I will post back on here if it works, thank you for taking the time to reply.
Photo of Robert Wahrenbrock

Robert Wahrenbrock

  • 3 Posts
  • 0 Reply Likes
Brandon it still didn't work any other ideas
Photo of Brandon

Brandon

  • 29 Posts
  • 7 Reply Likes
It's probably because the images are in iframes and not embedded into the page, That code will make sure the page is refreshed every load but not the iframes I'm guessing.

You could try to do this unless you have a specific reason for the iframes.
<img src="http://api.wunderground.com/api/XXXXXXXXXXX/animatedradar/q/MD/Annapolis.gif?&width=415&...;" width="330" height="400" border="0"> 

Hopefully that will work.
Photo of James Anding

James Anding

  • 59 Posts
  • 47 Reply Likes
Curious, are you trying to refresh the whole page or just the animated radar ?
If refreshing the page will work I know an easy solution.