Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  25 Jan 2021, Thomas Lindner, Suggestion, mhttpd browser caching 
    Reply  25 Jan 2021, Stefan Ritt, Suggestion, mhttpd browser caching 
       Reply  25 Jan 2021, Thomas Lindner, Suggestion, mhttpd browser caching 
    Reply  08 Feb 2021, Konstantin Olchanski, Suggestion, mhttpd browser caching 
       Reply  08 Feb 2021, Stefan Ritt, Suggestion, mhttpd browser caching 
Message ID: 2085     Entry time: 08 Feb 2021     In reply to: 2079     Reply to this: 2086
Author: Konstantin Olchanski 
Topic: Suggestion 
Subject: mhttpd browser caching 
>    r->rsprintf("Expires: %s\r\n", str);

The best I can tell, none of this works in current browsers. with google-chrome,
I see it cache pretty much everything regardless of "expires", "no cache", etc
and anything else I tried.

Things like shift-<reload>, etc used to work to refresh the cache, but not any more.

So, I too, see confusing side-effects of caching, where I change something in ODB,
but "nothing happens". Then I scratch my head for 30 minutes until I remember
to open the javascript debugger where shift-<reload> (or is it ctrl-<reload>) actually works.

It seems that the only reliable way to bypass the browser cache is to add
a tag with a random number to the URL ("&ts=currenttime").

This is for HTTP GET requests. HTTP POST does not seem to be cached, so I do not worry
about this nonsense for json-rpc requests.

Perhaps we should do this random number trick for all user actions. User can
press buttons only so fast, we should be able to sustain the rate. Anything
loaded automatically or from a timer, we should allow caching.

BTW, things like midas.js are also cached, and it is common to see problems
after updating midas, where status.html is newly loaded, but midas.js is an old
stale version from cache.

Messy.

K.O.
ELOG V3.1.4-2e1708b5