So this is what I was able to make work in image.html.tmpl:

    #if $show_plot
            <img src="${plot_name}.png?v=${int(time.time())}" 
alt="${plot_name}"/>
    #end if
that results in this:
            <img src="weekChargeWH.png?v=1698342767" alt="weekChargeWH"/>

I'll give your version a try and see if it works the same; which it does.  
What's funny is that the public version
of all this web stuff already has the timestamps, but that's done with 
post-processing as part of the publishing flow
to swap out the host names in the various hrefs before pushing the files 
out.

Thx, Chris
On Thursday, October 26, 2023 at 10:59:15 AM UTC-6 Karen K wrote:

> Sorry
>
> <img src="daySolarPower.png?v=$current.dateTime.raw" alt="daySolarPower"/>
>
> Karen K schrieb am Donnerstag, 26. Oktober 2023 um 18:58:29 UTC+2:
>
>> If it is a browser caching issue you can add ?v=$current.dateTime to all 
>> the image references. In your example:
>>
>> <img src="daySolarPower.png?v=$current.dateTime" alt="daySolarPower"/>
>>
>> [email protected] schrieb am Donnerstag, 26. Oktober 2023 um 15:53:21 
>> UTC+2:
>>
>>> Hi Karen,
>>>      So, the images get generated on an RPi, then rsync'd to the machine 
>>> with the web server.  I'd never used
>>> wee_report standalone, and made a directory to run it in, which was 
>>> empty afterwards.  The updated plots
>>> did generate (verified manually, and weewx isn't running, so nothing 
>>> newer from there), and they did sync over.
>>> I used a different browser, and the correct plots id display, so it 
>>> certainly looks like a browser caching issue.
>>> Checking the web comes up with the same solution I found for the same 
>>> problem as shown above.  I'll try finding
>>> a solution in cheetah, since that's generating the index.html.
>>> Thx, Chris
>>> On Thursday, October 26, 2023 at 5:39:08 AM UTC-6 Karen K wrote:
>>>
>>>> May be, the plot image files were not updated because newer versions of 
>>>> it exist. Have you checked the file date/time of the PNG files?
>>>>
>>>> vince schrieb am Mittwoch, 25. Oktober 2023 um 23:06:54 UTC+2:
>>>>
>>>>> Sorry - no help here.  I've had webcam snapshot images that are 
>>>>> uploaded periodically by cron referenced in my templates and unrelated 
>>>>> static pages for many years and have never had any caching issues in any 
>>>>> browser on any platform.  I don't do anything at all re: caching or not 
>>>>> caching images.
>>>>>
>>>>> I use nginx on linux as the webserver, if that's at all relevant.
>>>>>
>>>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/b6372957-a9b1-4f0b-aa87-53465e63736an%40googlegroups.com.

Reply via email to