javascript versionning
Summary
The fact that our JS files always use the same names (manager.min.js) might cause issues when upgrading LLNG
#1740 is suspected to occur after an update, when the old, cached javascript code is used against the new REST server.
A lot of web application, especially the javascript-heavy ones, use versionning on their javascript file to make sure the browser cache will not persist after an upgrade.
Design proposition
The simplest solution is simply to append the version number to the JS (and possibly CSS) urls as a query string
/static/js/manager.min.js
=> /static/js/manager.min.js?v=2.0.5
That way, file names don't have to change on disk, and there is no specific web server configuration required either
Some applications also change the file name (manager.min.2.0.5.js) to optimize caching, but I don't think we really need that.
To avoid exposing version information, we could replace the version number by a truncated hmac computed from the version number and configuration secret key.
(exemple: echo -n "2.0.5" | openssl dgst -SHA1 -mac HMAC -macopt hexkey:0123456789ABCDEF | awk '{print substr($2,0,8)}'
)
And finally, when doing development work, it would be handy, if this code could be derived from git revision. (But I think we all work with our browser cache off, so that's probably a very low priority).