Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.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 posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Cumulus templates

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

Moderator: daj

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

Cumulus templates

Post by beteljuice »

Believe or not I haven't used the packaged templates yet :lol:

But looking at other sites, they all seem to state
... these pages are updated every x minutes ...
This is misleading to say the least !

There is nothing in the page coding to force a refresh for any interval.

The data and / or page may be recreated every x minutes, but unless the viewer does a manual page refresh they are not going to see any change of content.

I think a change of wording may be advisable.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
huins
Posts: 8
Joined: Fri 02 Jan 2009 10:02 am
Weather Station: Davis Envoy, Axis 2100 network c
Location: Huins, the Netherlands
Contact:

Re: Cumulus templates

Post by huins »

I have placed this metatag
<meta http-equiv="Pragma" content="no-cache">
in the webtemplatesT <head> section.
That works
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus templates

Post by steve »

Pedants 'R' Us :)

The pages are updated every x minutes. How you choose to view them is up to you.

I suppose it could be changed to: "The data are updated every x minutes". But that's still not right, because it's the pages that are updated every N minutes, which is where we came in.

I suppose it could be changed to "The pages are uploaded every x minutes". But that might not be right because some people don't actually upload them.

Anyway, it's something people can easily change for themselves if they want.

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

Re: Cumulus templates

Post by beteljuice »

I was thinking more of the newbies who would take the statement at face value.

The beteljuice has been known to 'chase' sloppy / unsound assumptions, but that was not my intention in this case :P

Just wishing to lighten the darkness, or at least highlight a grey area !
Image
......................Imagine, what you will KNOW tomorrow !
Samuel
Posts: 53
Joined: Wed 22 Oct 2008 7:31 pm
Weather Station: WH1080
Operating System: vista
Location: Pålsboda, Sweden
Contact:

Re: Cumulus templates

Post by Samuel »

<meta http-equiv="refresh" content="150" />
in head refresh the page every 150 sec
Image
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus templates

Post by steve »

beteljuice wrote:Just wishing to lighten the darkness, or at least highlight a grey area !
Yeah, I know :)

It just seems to be standard practice to use that sort of wording, and to explicitly state when pages auto-refresh. What does annoy me is when pages tell you to use F5 to refresh! How do they know what I'm using?

Steve
TNETWeather

Re: Cumulus templates

Post by TNETWeather »

Samuel wrote:<meta http-equiv="refresh" content="150" />
in head refresh the page every 150 sec
I'm not a big fan of refresh.

I figure that if someone wants to refresh their page, they will do it on their own.

Also, if you end up with a bunch of campers, you end up serving content that is not actually viewed. In the case of the Cumulus stock pages, that is not a big deal, but some of the bigger sites with lots of contents that starts to add up.

I've seen some sites camped for several weeks on some websites with clients thinking they are getting hacked because a specific IP keeps hitting their site.

It also inflates page counts.

Campers = someone who visits you site, places it in a tab and tab's away from it for hours sometimes days on end. The refresh keeps refreshing, but nobody is actually looking at the data.
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Cumulus templates

Post by gwheelo »

Concerning the "no cache" option, it appears IE requires more instruction than other browsers.

I have been using:

To properly prevent the Web page from appearing from the cache, place another header section at the end of the HTML document. For example:

<HTML>

<HEAD>

<META HTTP-EQUIV="REFRESH" CONTENT="5">
<TITLE> Pragma No-cache </TITLE>
</HEAD>

<BODY>

This is an example of where to place the second header section<br>
so that the "Pragama, No-Cache" metatag will work as it is supposed to.<br>

</BODY>

<HEAD>

However - even this is not bullet proof. IE misses the instruction from time to time. There is nothing like pulling up my webcam page at 9:00 in the morning and seeing nothing but black screen with a bunch of streetlights. Anyone know a more certain method?

GW
Image
TNETWeather

Re: Cumulus templates

Post by TNETWeather »

That is not valid code. You cannot have a <head> section after the the <body> element has been declared. No version of HTML supports that.

Chances are you have something else going on in your real <head> section that is preventing it from working properly.

Do you have a page URL you can point to where you are having this issue?
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Cumulus templates

Post by gwheelo »

Not valid HTML - just following instructions at: http://support.microsoft.com/kb/222064

GW
Image
TNETWeather

Re: Cumulus templates

Post by TNETWeather »

That is correct. Not valid HTML.... There is no published specification of HTML that permits such code...

What you are pointing at is an article from Microsoft and is not an HTML specification. Instead it is a very old article that covered quirks of...
APPLIES TO
* Microsoft Internet Explorer 4.01 Service Pack 1
* Microsoft Internet Explorer 4.0 128-Bit Edition
* Microsoft Internet Explorer 3.02
It was dated "February 23, 2004" and was not for a modern browser. MSIE7 Beta has similar issues, but they were fixed before the first official release around Feb 2005.

If you look at the article it also states that it is...
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
But this is 2009... and if you use proper HTML with a proper DoctType, you should not have that type of issue.

The proper META tags would look like:

Code: Select all

<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
and would be between the <head> statements at the top of the page. It would work best if the entire document contained a DocType so that the browser knew which version of HTML you were attempting to use and had valid HTML throughout the page.

I don't have an active webcam at the moment, but I do have a sample page setup that fetches a webcam from South Mountain in Phoenix AZ... Their webcam image is updated only 4 times an hour so it is not the greatest example, but the sample web page using a refresh of 1 minute, seems to work without issues on all modern browsers FF3, MSIE7, Safari3 and even Google Chrome.

http://www.tnetweather.com/test/testit05.php

The code for which is:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US">
    <head>
        
        <meta http-equiv="Cache-Control" content="no-cache" />
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="-1" />
        <meta http-equiv="refresh" content="60" />
        
        <title>South Mountain Webcam</title>
        
        <style type="text/css" >
            body { 
                background-color: #C4D0E5; 
                font-family: verdana; 
                margin: 10px; 
                width: 90%;
            }
        </style>
        
    </head>
    
    <body>
        
        <h2>South Mountain - Phoneix Arizona, USA</h2>
        <h3>Webcam Facing East</h3>
        <p>
            Time: <?php echo date("D M j Y G:i:s T "); ?>
        </p>
    
        <div align="center">
            <img src="somt1.jpg" alt="Phx Webcam"/> <br/> <br/>
        <img src="/images/tnet_valid-xhtml10-blue.png" alt="Valid XHTML"/>
        </div>
                
    </body>

</html>
However, using cache control is not normally even needed if you call images properly in a page by adding a unique id at the end of them.

You can do something similar in PHP like:

Code: Select all

<img src="somt1.jpg?<?php echo time(); ?>"
This makes the request look something like: somt1.jpg?1231069931

The server will ignore the passed parameter, but the browser will consider each instance as a unique file name. You can do the same thing for other fetched content. This is a very common JavaScript technique. There are many JavaScript examples on the net on how to do the same for that as well.

Or course if the visitor's browser cache is full or too large, then none of this works, but that would be the visitors problem, not the web page. Kind of like them running out of disk space.
User avatar
gwheelo
Posts: 453
Joined: Wed 11 Jun 2008 7:36 pm
Weather Station: WMR-88
Operating System: Windows 8.1
Location: L'Estartit, Spain
Contact:

Re: Cumulus templates

Post by gwheelo »

Well that's what happens when grabbing the first thing you see and not reading through the information. I will set about correcting my error and as a New Year resolution promise to research more thoroughly before taking the first candy that is placed in front of me!

Once more aimed in a better direction by this forum!

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

Re: Cumulus templates

Post by beteljuice »

Or to put it another way:

If you really must have the viewer refreshing your web page so that they see your last uploaded data (if you really did it !)

Stitch them all together and your Cumulus Template will start something like:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="<#location> weather data">
<meta name="keywords" content="Cumulus, <#location> weather data, weather, data, weather station">

<meta http-equiv="Cache-Control" content="no-cache" >
<meta http-equiv="Pragma" content="no-cache" >
<meta http-equiv="Expires" content="-1" >

<script language="JavaScript">
document.write("<meta http-equiv='refresh' content='"+ (<#interval> * 60) +"' >");
</script>

<title><#location> weather</title>

<link href="weatherstyle.css" rel="stylesheet" type="text/css">
</head>
NB. The tags follow the existing doctype and are closed by ">" NOT "[space]/>"

Refreshing the entire page is a very clunky thing, and I would only grudingly recommend it for a page rebuild of 5 => 10 mins and containing current data.

<5 mins would be very annoying - find a different way, >10 mins - why are they sitting on an infrequently updated page so long ?

(Edited - spolling misteak)
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply