Update paused reload page to start message in WD

I have my home webpage updating every 10 seconds -“Updated: 7/13/2009 12:19:18pm - updated 5 sec ago”
then after 10 mins this appears “Updates paused - reload page to start 7/13/2009 12:20:37pm - updated 90 sec ago”
The page will begin loading again after 600 secs - does another 600 secs of loading every 10 secs before it pauses again for another
600 secs. Ive seen other sights continually updating every 4 secs and no pausing.
Can anyone tell me puleeese how to resolve this. Website is: http://www.nanaimoharewoodwx.com/wxweather/wxindex.php
and WD version is 10.37N build28

hello…

by default, when you download the ajax/wd/php templates…the file inside the templates that controls the ajax updates and setting’s… which is is named “ajaxWDwx.js” is set at this:

// – begin settings --------------------------------------------------------------------------
var flashcolor = ‘#00CC00’; // color to flash for changed observations RGB
var flashtime = 2000; // miliseconds to keep flash color on (2000 = 2 seconds);
var reloadTime = 10000; // reload AJAX conditions every 5 seconds (= 5000 ms)
var maxupdates = 12; // Maxium Number of updates allowed (set to zero for unlimited)

where the line that reads this:

var maxupdates = 12; // Maxium Number of updates allowed (set to zero for unlimited)

determines how many times the ajax updates will occur…before you or any visitor’s to your site will need to hit the “refresh” button on your browser, to get them started/updating again…for another 12 times,…before they will once again stop.

The reason it is set this way is to stop someone that is visiting your site…to just sit on your site all day, wasting bandwidth…watching the ajax updates run continously.

if you wish, you can change that number from the default '12"…to something like “48”…which will allow your ajax updates to run for about 3 minutes, before the refresh button needs to be clicked on. more than likely 3 minutes should be long enough for who ever is visiting your site to get the latest conditions.

The “var maxupdates = 12;” basically means that every 5 seconds your ajax updates occur is equivalent to 1 minute. 12 X 5 seconds = 60 seconds/1 minute…so setting it to 48 will be equivalent to 3 minutes…as long as your ajax updates are happening every 5 seconds.

if your ajax updates arer occurring every 10 seconds, then the “var maxupdates = 12;” would mean that your updates will stop after 4 minutes. which bolils down to every 10 seconds X 12 = 240 seconds/or 4 minutes.

So if you wish for your’s to be changed…you need to open with notepad… your “ajaxWDwx.js” file…and edit the “var maxupdates = 12;” line in the setting’s area of that file to a higher number than 12 times…or you can also set it to “0” for unlimitted times (which is not recommended to do so, and will prevent any visitor’s from sitting on your website/webpage all day long wasting your bandwidth)

…Chris

Thank you so much for that Chris… I just pulled your reply and so haven’t followed your instructions yet
but sounds like that will be the solution. I’m going to get on that right away… your a good man

VE7/paul

Paul,

And then the 600 sec refresh that you noted came from the

that you have in the section.

  • Jim

you welcome paul…

I have my own ajax updates set at every 5 seconds for 48 times…or equivalent to 3 minutes…before needing to hit the refresh button.

I also have within my Live webcam setup setting’s…so that the live webcam is set to stop,…after someone has been viewing it for 10 minutes. then by hitting the refresh button it will start again. BOTH of these setting’s prevent visitor’s from sitting on my website pages all day long wasting bandwidth.

…Chris

oh oh it’s not working for some reason… I edited script to:
var flashcolor = ‘#00CC00’; // color to flash for changed observations RGB
var flashtime = 2000; // miliseconds to keep flash color on (2000 = 2 seconds);
var reloadTime = 10000; // reload AJAX conditions every 5 seconds (= 5000 ms)
var maxupdates = 0; // Maxium Number of updates allowed (set to zero for unlimited)

set it to zero temporarily to see if it would run on but reload appears again shortly after. And I see the
default is 5 secs for a reload and when it’s working Im getting every 10 secs… so sounds like
something is screwing things up

Jim - I was looking for:

that you have in the section.

Where is that … what template? And is the 600 secs a default or should it be changed…

paul

Paul…

That and all your other META tags are is inside your “top.php” file

…chris

Thanks Guys — Updates are now working as they should… After AjaxWDwx.js was edited
I expected a correction right away but it appeared that the old data was being buffered or cached
because it took about 15-20 mins for the update paused reload message to disappear for good…I
then set it to reload after 8 mins of updating and all is tickety boo

thanks men

Generally, the JavaScript ajaxWDwx.js is cached in memory in the browser, so you’ll need to do a shift-Reload to fetch a new copy (or close the browser and reopen) – that’s why it took so long to show the change :slight_smile:

Thanks Chris and Jim … you analyzed and suggested solutions to the issue very well! =D> :hello1: :occasion5:

Best regards,
Ken

Hey folks,

I’m having the exact issue.

I reached out to Ken who explained it just as it was here

I’m ok with that. My big question is why haven’t I experienced this before. This just started to have this issue approx a week ago. I haven’t touched any php code at all. I
may have updated WD. I also took a Mac oSX security update - both of which shouldn’t effect this.

Also curious what value I should set it to. 0/unlimited doesn’t seem right. I’m not sure how often my ajax updates occur