Page 1 of 3
Not updating every 60s
Posted: Mon 22 Mar 2021 1:38 pm
by richard_newberry
Hi, the index.htm page isn't automatically updating every 60s.
do i need to insert my own code to do this?
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 2:20 pm
by mcrossley
All that testing and nobody (including me picked this up)
It needs a change to setpagedata.js, the version below works for me if you'd like to try it...
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 3:54 pm
by ConligWX
mcrossley wrote: ↑Mon 22 Mar 2021 2:20 pm
All that testing and nobody (including me picked this up)
It needs a change to setpagedata.js, the version below works for me if you'd like to try it...
lol, Mark we all have to keep you on your toes!
Personally I thought this only worked due to the interval being set at 60 Seconds, maybe I was wrong.
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 3:59 pm
by mcrossley
The script is supposed to update from the JSON every 60 seconds, but obviously the data will only update as frequently as your upload interval.
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 7:23 pm
by jon_iz
Is this affecting 3120 or 3121, or both?
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 7:49 pm
by ConligWX
jon_iz wrote: ↑Mon 22 Mar 2021 7:23 pm
Is this affecting 3120 or 3121, or both?
not sure though auto update was added to: Release 3.10.2 - build 3117 though it appears it was somehow broken.
Code: Select all
New: Default web site now auto updates the index.htm and today.htm pages every minute
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 8:03 pm
by richard_newberry
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 8:38 pm
by ConligWX
And your interval is set to 60 seconds as well? otherwise the websitedata.json file which carries the data to the webserver is the same after 60 seconds and you wont notice any change.
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 8:42 pm
by ConligWX
my index.htm did update just now whilst I was on the site I went to website at 20:38 waited until 20:40 and the index.htm had updated itself and showed
"Conditions at local time 20:40 on 22 March 2021"
also make sure your webserver has the correct time.
just checked again it seems to update at 20:45:59 seconds and not 20:45:00
i'm guessing it does update at 20:45, but the json file has not updates as yet and did not show until 20:46 its just a matter of slight timing.
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 8:53 pm
by ConligWX
Yes I watched the time on the cumulus admin console. checking ftp logs too. the json file is sent dead on the 5:00 mins, but by then the 60 second refresh has already happened, and thus you dont see then next json change until the next refresh - 1 minute after.
Mark could the refresh be done 5 seconds past the minute? this will allow the json file to be uploaded and then refreshed. I dont know if that is possible
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 9:00 pm
by richard_newberry
ConligWX wrote: ↑Mon 22 Mar 2021 8:38 pm
And your interval is set to 60 seconds as well? otherwise the websitedata.json file which carries the data to the webserver is the same after 60 seconds and you wont notice any change.
Yes it is
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 9:23 pm
by mcrossley
ConligWX wrote: ↑Mon 22 Mar 2021 8:53 pm
Mark could the refresh be done 5 seconds past the minute? this will allow the json file to be uploaded and then refreshed. I dont know if that is possible
It happens 60 seconds after the first download, it isn't tied to any clock time
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 9:39 pm
by PaulMy
Are you saying that the index.htm Now page should auto update every minute?
That is the:
Conditions at local time 17:25 on 22 March 2021
Page updated 22/03/21 5:25:00 PM.
Heck, if I can get mine updated within the same hour I am happy. I delete browser cache, go to another computer, try it on a tablet and then drop it to see if it to update... and still 5:25 PM
In my 13 minutes to type this it still hasn't changed
Enjoy,
Paul
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 9:55 pm
by ConligWX
PaulMy wrote: ↑Mon 22 Mar 2021 9:39 pm
Are you saying that the index.htm Now page should auto update every minute?
That is the:
Conditions at local time 17:25 on 22 March 2021
Page updated 22/03/21 5:25:00 PM.
Heck, if I can get mine updated within the same hour I am happy. I delete browser cache, go to another computer, try it on a tablet and then drop it to see if it to update... and still 5:25 PM
In my 13 minutes to type this it still hasn't changed
Enjoy,
Paul
try updating your setpagedata.js file!!!! your using an old file!
http://www.komokaweather.com/cumulusmxt ... agedata.js
Code: Select all
/* ----------------------------------------------------------
* setpagedata.js v:0.1.0 d:Mar 2021 a:Neil Thomas
* Last modified: 2021/03/19 09:21:06
* Basic scripts for all new at-xxxx.html template pages.
* Incorporating changes suggested by beteljuice
* Requires jQuery
viewtopic.php?p=152564#p152564
Re: Not updating every 60s
Posted: Mon 22 Mar 2021 10:00 pm
by ConligWX
richard_newberry wrote: ↑Mon 22 Mar 2021 1:38 pm
Hi, the index.htm page isn't automatically updating every 60s.
do i need to insert my own code to do this?
Richard yours is not updating for me. maybe you have some caching going on your webserver.
if you have try adding this to your .htaccess just for a test.
Code: Select all
# DISABLE CACHING
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
<FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|mp3|mp4|png|pdf|swf|txt)$">
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<IfModule mod_headers.c>
FileETag None
Header unset ETag
Header unset Pragma
Header unset Cache-Control
Header unset Last-Modified
Header set Pragma "no-cache"
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
</IfModule>
</FilesMatch>