hello
how can i disable, that pimatic use the browser cache?
i use in pimatic some graphics from my weatherstation, and the
pictures not up-to-date.
i must clean every time my cache to see the new graphics.
browser cache
hello
how can i disable, that pimatic use the browser cache?
i use in pimatic some graphics from my weatherstation, and the
pictures not up-to-date.
i must clean every time my cache to see the new graphics.
@noxx I think you solution isn’t good. How do you show your graphics?
pimatic rocks!!!
iframe, the images are stored on the pi
{
"class": "iframeDevice",
"id": "iframe-ws-aussentemperatur",
"name": "WS Aussentemperatur",
"url": "http://192.168.1.221:8080/_HeuteAussentemperatur.png",
"width": 800,
"height": 300,
"border": 0,
"scrolling": "no",
"scale": 1,
"reload": 300
}
but “reload”: xxx is no option
it seems that this function reload complete browser and not only the picture.
like html code:
<meta http-equiv=“refresh” content=“30; URL=http://192.168.1.100” />
but i had try it, reload dont reload the picture (in background)
so the question again: how can i disable browser cache?
If Pimatic is loading a iframe to show the pictures, then the caching is absolutely out of reacht for Pimatic.
Like @Icesory said changing Pimaitc settings is not the solution.
Start isolating the problem by loading the page and pictures out of pimatic (directly) and see where and when the problem starts.
Reload is only for the iframe page, not for pimatic: reload : Reload cycle in seconds for iframe source. 0 = no reload
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
the problem is the browser cache.
you see my code above, I had try it with different browser, like Firefox, Chrome or dolphin
What cache-control headers do you see on the picture when loaded in a browser?
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
Hey noxx,
I had the same cache issue with the iframe-plugin here.
thx, I will look. perhaps a solution.
but I think this is a big bug in pimatic or the iframe-plugin
@noxx
Did you try it in private-mode?
firefox: Strg+Umschalt+P
chrome: STRG+Umschalt+N
Headers for my iframe part in Pimatic. As you can see, the max age is 0. Can you show what your iframe has?
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
where can I see this?
In your iframe you are calling a url. The best thing to do is to use a shellsensor with a command like "echo date
" which will give you something like zo feb 7 13:54:06 CET 2016
(Dutch locale).
As you can see it changes every second.
Use the acquired variabele as a parameter in your iframe url call, something like:
http://my_weatherstation_url?date=$shellsensorvariabele
Of course the parameter will be ignored by your weatherstation but in this case the webserver can’t use a cached version as the parameter has changed requiring a new “fresh” call to the webpage/url.
This is an extremely old trick from the old days.
Edit: With the call I mean the “load my_iframe http://pimatic.org/plugins/pimatic-iframe?date=$shellsensorvariabele” rule option.
@Harry-van-der-Wolf said:
In your iframe you are calling a url.
hmm, i dont know where…
i see here no header infos, only my old image.
http://www.bilder-upload.eu/show.php?file=34878a-1454874810.png
A few posts above you have your device with the url:
"url": "http://192.168.1.221:8080/_HeuteAussentemperatur.png"
If you make this something like:
"url": "http://192.168.1.221:8080/_HeuteAussentemperatur.png?date=$shellsensorvariabele"
it should work.
Simply update the shellsensor every 290 seconds and you have always a new value.
It doesn’t matter whether the url is a (static) page or an image or whatever.The webserver sees a request and the url has changed. So the webserver makes a new request for the “url data” instead of using the data from the cache.