Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.11.4 (build 3133) - 25 May 2021
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are interested in supporting Cumulus then maybe you would like to contribute to the maintenance of the Wiki? This need not take hours of your time - just a half hour here and there can make a big difference, particularly if many people are doing this. Any contributions are very welcome, whether they involve new content or editing of existing content. It will be very helpful to current and future users of Cumulus software if the Wiki is kept well-maintained and current. If you are interested then please contact forum user saratogaWX and ask for a Wiki account.

Now & Today Pages Not Updating

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
euphbass
Posts: 9
Joined: Tue 23 Mar 2021 10:07 pm
Weather Station: Aercus WS3085
Operating System: Mac OSX

Now & Today Pages Not Updating

Post by euphbass »

Hi there,

I've set up the standard web template (as supplied with MX) on my webspace, and it's all working fine except that the front page (index.htm) and Today (today.htm) pages refuse to update unless I clear my browser history. The guages update fine, every 15 sec, and the graphs and so on are all fine. Cumulus itself is set to update as appropriate in the Internet settings.

The fact that I'm having to clear the browser history to get it to update suggests it's using a cached version, so I've tried using a Cache-Control modification in a .htacess file on the web server, and I've also tried using HTML meta tags on the affected pages:

<meta http-equiv=“Pragma” content=”no-cache”>
<meta http-equiv=“Expires” content=”-1″>
<meta http-equiv=“CACHE-CONTROL” content=”NO-CACHE”>

Neither has worked, unfortunately, so perhaps there's something more going on than just a cache issue? Also, if it was a cache issue, I'm sure more people would have had issues before now and I can't find this specific issue in the forum.

Also, it looks like it should be doing a forced update every 60 sec, according to the setpagedata.js file:

// auto update every 60 seconds, only the index and today pages
let pageName = window.location.href.split('/').pop();
if (pageName == 'index.htm' || pageName == 'today.htm') {
setTimeout(function () {
getPageData();
}, 60 * 1000);

But this isn't happening. Maybe it's refreshing from cache, I don't know.

Any suggestions for what's going on? Thanks!

User avatar
beteljuice
Posts: 3231
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Now & Today Pages Not Updating

Post by beteljuice »

There have been some 'fixes' ...

... try viewtopic.php?p=152628#p152628
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
ConligWX
Posts: 1267
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2 Plus w/DFARS
Operating System: Ubuntu 20.04.2 LTS - NUC
Location: Bangor, NI
Contact:

Re: Now & Today Pages Not Updating

Post by ConligWX »

there is a fix issued,

HOWEVER , what people also need to understand is the pages index.htm and today.htm are refreshed by default 60 seconds, but the data that these pages access is only updated by whatever CumulusMX Log interval is set as.

so, in my scenario, My CumulusMX Log interval is 5 minutes. So I only get a websitedata.json created every 5 minutes for the my website to read, no matter that the setpagedata.js defaults to "refresh the page" in 60 seconds.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir PA-II-SD • CumulusMX •

euphbass
Posts: 9
Joined: Tue 23 Mar 2021 10:07 pm
Weather Station: Aercus WS3085
Operating System: Mac OSX

Re: Now & Today Pages Not Updating

Post by euphbass »

Thanks for the prompt replies! I've uploaded the latest setpagedata.js from the linked thread, and I've also changed the update rate in Cumulus to 2min rather than 30min (for easier testing, for the time being), and unfortunately it hasn't made any difference. Home and today still refuse to update without clearing the browser history. The website data.json file is updating on the server at the specified interval, it's just the webpage that won't update. Since the hacks to force it not to use cache haven't worked either, I'm pretty much out of ideas. Any suggestions most welcome!

freddie
Posts: 1352
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux Ubuntu 20.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Now & Today Pages Not Updating

Post by freddie »

It sounds as if your host has an aggressive caching policy. You might ask them to adjust the length of time JSON files are cached for. If you're self hosting you can make this adjustment yourself.
Freddie
Image

euphbass
Posts: 9
Joined: Tue 23 Mar 2021 10:07 pm
Weather Station: Aercus WS3085
Operating System: Mac OSX

Re: Now & Today Pages Not Updating

Post by euphbass »

Yes, it sounds like that might be the issue. I'm with Dreamhost. I've been looking into it and I've found their default caching times for various file types, and I'm modifying it via a .htaccess file. I've got it so it now updates with a standard page refresh, without having to clear the browser history - step in the right direction! Just need to keep at it and see if I can get it to auto-update somehow. Thanks for the advice!

Post Reply