diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 369a4485f..c8f2ec159 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -42,6 +42,20 @@ var _ = require("underscore"); exports.root = absolutePaths.findEtherpadRoot(); console.log(`All relative paths will be interpreted relative to the identified Etherpad base dir: ${exports.root}`); +/* + * At each start, Etherpad generates a random string and appends it as query + * parameter to the URLs of the static assets, in order to force their reload. + * Subsequent requests will be cached, as long as the server is not reloaded. + * + * For the rationale behind this choice, see + * https://github.com/ether/etherpad-lite/pull/3958 + * + * ACHTUNG: this may prevent caching HTTP proxies to work + * TODO: remove the "?v=randomstring" parameter, and replace with hashed filenames instead + */ +exports.randomVersionString = randomString(4); +console.log(`Random string used for versioning assets: ${exports.randomVersionString}`); + /** * The app title, visible e.g. in the browser window */ diff --git a/src/templates/index.html b/src/templates/index.html index 0e36f71cc..4fb810478 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -35,8 +35,8 @@ - - + + - +