It works !!!

You are a genius, thank you !!

I finally solved the problem of updating the charts for good.

But the code:

*#import time*

*#set $ cachebuster = time.time*


do I always have to repeat it on each pair of images?

Thanks again from the heart !!!
Il giorno sabato 6 febbraio 2021 alle 15:50:14 UTC+1 [email protected] ha 
scritto:

> Hardcoding a timestamp makes it not a timestamp and will accomplish 
> nothing.
>
> Try this:
>
> #import time
> #set $cachebuster = time.time
> <a data-fancybox="gallery" href="daytempdew.png?v=1612619365">
>   <img src="daytempdew.png?v=$cachebuster"
>      alt = "$Extras.Translation.temperatures">
> </a>
>
> On Feb 6, 2021, at 6:22 AM, [email protected] <[email protected]> wrote:
>
> 
>
> No way:
> I added the timestamp to the images but it doesn't work!
>
> <a data-fancybox="gallery" href="daytempdew.png?v=1612619365"> <img src = 
> "daytempdew.png? v = 1612619365" alt = "$ Extras.Translation.temperatures"> 
> </a>
>
> Il giorno sabato 6 febbraio 2021 alle 03:18:08 UTC+1 [email protected] 
> ha scritto:
>
>> Not sure if this is related, but I've got a similar issue with pictures 
>> getting posted on the web that "weren't updating."
>> Turns out there's a trick to trick the cache into reloading the image 
>> file, and it is essentially including an argument
>> in the URL of a timestamp for the image.  That defeats the browsers 
>> caching mechanism. It looks like this:
>> <td align="center"><small><a href="myshake/gifs/RD066_EHZ_AM_00.
>> 2019100200 <(201)%20910-0200>.gif?v=1570017689"> night </a>
>>               &nbsp/&nbsp <a href="myshake/gifs/RD066_EHZ_AM_00.
>> 2019100212 <(201)%20910-0212>.gif?v=1570060855"> day </a></small></td>
>> Chris
>>
>> On Friday, February 5, 2021 at 6:06:20 AM UTC-7 [email protected] wrote:
>>
>>> I change the skin but nothing....
>>>
>>> Il giorno venerdì 5 febbraio 2021 alle 09:01:26 UTC+1 gjr80 ha scritto:
>>>
>>>> OK, now I see the plots are sitting on 08:00 (it's 08:50) now and no 
>>>> amount of refreshing will update them. In fact if I look at just one of 
>>>> your image files directly (eg http://www.meteomestre.it/daywindvec.png) 
>>>> it exhibits the same behaviour only stuck on the time I first viewed the 
>>>> plot. This was in Firefox. If I look at your site in Chrome it is stuck on 
>>>> the same 08:00 plots. Interestingly if I open the same plot file directly 
>>>> that I did in Firefox I see the plot is timestamped 08:35. If I open a 
>>>> different plot file directly I see the current time stamp (most recent 
>>>> upload). No amount of cache clearing will fix it for me (in either Chrome 
>>>> or Firefox).
>>>>
>>>> Clearly the files are being uploaded to your web server OK so that 
>>>> rules out WeeWX. The fact that two browsers have the same issue tends to 
>>>> rule out browser quirks. Which only leaves your HTML/scripts. Think you 
>>>> need a HTMl/javascript/CSS expert, something in there will be doing it.
>>>>
>>>> Gary
>>>>
>>>> On Friday, 5 February 2021 at 17:00:35 UTC+10 [email protected] wrote:
>>>>
>>>>> Obviously I'm talking about the graphs, if you look closely, those of 
>>>>> the day are still.
>>>>> They should update every 5 minutes ...
>>>>>
>>>>> Il giorno venerdì 5 febbraio 2021 alle 07:48:05 UTC+1 
>>>>> [email protected] ha scritto:
>>>>>
>>>>>> If I delete the browser cache, it updates regularly, but then remains 
>>>>>> blocked there
>>>>>>
>>>>>> Il giorno venerdì 5 febbraio 2021 alle 07:45:10 UTC+1 
>>>>>> [email protected] ha scritto:
>>>>>>
>>>>>>> Yes, the station updates regularly and transmits data.
>>>>>>> These are the graphics that are not transmitted and updated on the 
>>>>>>> site.
>>>>>>> I checked the local and remote folder, and the graphs are regularly 
>>>>>>> updated.
>>>>>>> It appears to be a cache problem.
>>>>>>>
>>>>>>> Il giorno venerdì 5 febbraio 2021 alle 07:35:50 UTC+1 
>>>>>>> [email protected] ha scritto:
>>>>>>>
>>>>>>>> is this the correct target ftp location?
>>>>>>>>
>>>>>>>> On 5 Feb 2021, at 5:24 pm, [email protected] <[email protected]> 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Feb  5 05:55:32 raspberrypi weewx[7414] DEBUG weeutil.ftpupload: 
>>>>>>>> Connected to it31.siteground.eu
>>>>>>>> Feb  5 05:55:32 raspberrypi weewx[7414] DEBUG weeutil.ftpupload: 
>>>>>>>> Uploaded file /home/weewx/public_html/favicon.ico to /public_html/
>>>>>>>> www.meteomestre.it/favicon.ico
>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
> 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/0978bc52-8c1a-4765-a5a2-1f63cac82364n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/0978bc52-8c1a-4765-a5a2-1f63cac82364n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
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/666a2e6a-46fb-42f1-aa79-469d2d3923fen%40googlegroups.com.

Reply via email to