> This is from a different web published RPi dodad raspberryshake (mine is 
broken at the moment).  Anyhow, the trick is to add a timestamp to the href 
that updates with the image so that it tricks the caching mechanism into 
reloading the same named file when the timestamp has changed.  Does cheetah 
support that sort of thing?

Yes, Cheetah supports it. I use this trick in my Belchertown skin 
<http://belchertownweather.com/go/btowngithub> to prevent caching. Here's 
how you can use it too. 

This is *NOT TESTED* on Seasons, so be sure to have a backup. Find the 
images you want to stop caching for. For example inside the 
index.html.tmpl. Add this to the end of the image src: ?v=#echo int( 
time.time() ) #

For example in a full line:

<img src="daybarometer.png?v=#echo int( time.time() ) #" alt=
"$obs.label.barometer"/>

That'll change the img src to have a timestamp at the end, similar to your a 
href you have mentioned. The timestamp will not be when you refresh the 
page, but rather the time when weewx generated the index.html page. So it 
should update every archive interval with a new timestamp appended. 

On Sunday, September 22, 2019 at 6:34:07 PM UTC-4, Chris Richmond wrote:
>
> All, this can't be a new thing, but using Chrome and weewx 3.9.1, the 
> graphs don't reload when refreshing the
> web page.  Rather than having to clear the image cache in Chrome's 
> Settings, is it reasonable to add a trick like this:
> <a href="myshake/gifs/RD066_EHZ_AM_00.2019090100.gif?v=1567339258 
> <http://www.csrhome.online/myshake/gifs/RD066_EHZ_AM_00.2019090100.gif?v=1567339258>
> ">
>
> This is from a different web published RPi dodad raspberryshake (mine is 
> broken at the moment).  Anyhow, the trick
> is to add a timestamp to the href that updates with the image so that it 
> tricks the caching mechanism into reloading the
> same named file when the timestamp has changed.  Does cheetah support that 
> sort of thing?
>
> Semi-unrelated, but is there a way to get the rsync report to run after 
> the the images are generated rather than
> before?  As it is, the images are always a cycle behind the rest of the 
> page updates.  The report module isn't sorting
> the names, but maybe naming rsync ZRSYNC and sorting the report names 
> would work???
>
> Sep 22 16:20:38 pivue weewx[30301]: copygenerator: copied 0 files to 
> /home/weewx/public_html.vp2
> Sep 22 16:25:14 pivue weewx[30301]: manager: Added record 2019-09-22 
> 16:25:00 MDT (1569191100) to database 'weewx.sdb'
> Sep 22 16:25:15 pivue weewx[30301]: manager: Added record 2019-09-22 
> 16:25:00 MDT (1569191100) to daily summary in 'weewx.sdb'
> Sep 22 16:25:16 pivue weewx[30301]: rsyncupload: rsync'd 23 files (168,268 
> bytes) in 0.96 seconds
> Sep 22 16:25:32 pivue weewx[30301]: cheetahgenerator: Generated 9 files 
> for report SeasonsReport in 14.57 seconds
> Sep 22 16:25:38 pivue weewx[30301]: imagegenerator: Generated 14 images 
> for SeasonsReport in 6.61 seconds
> Sep 22 16:25:38 pivue weewx[30301]: copygenerator: copied 0 files to 
> /home/weewx/public_html.vp2
>
> Site is here: http://www.csrhome.online/vp2weather/index.html
>
> thx,Chris 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a99173ad-c9b5-4526-b056-0b033c268abb%40googlegroups.com.

Reply via email to