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: 2086     Entry time: 08 Feb 2021     In reply to: 2085
Author: Stefan Ritt 
Topic: Suggestion 
Subject: mhttpd browser caching 
> 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").

Indeed that's the only reliable way to avoid caching across browsers. An alternative is

("&r=" + Math.random())

to add a random number.


> 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.

Reloading JavaScript file NOT from the cache is really tricky these days. I added a
special Google Chrome extension to clear my browser cache, which works reliably:

https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn

Stefan
ELOG V3.1.4-2e1708b5