diff --git a/src/js/yunohost/helpers.js b/src/js/yunohost/helpers.js index ba1d4ff1..fc6260f3 100644 --- a/src/js/yunohost/helpers.js +++ b/src/js/yunohost/helpers.js @@ -1,4 +1,10 @@ (function() { + + // This is to fetch the "RANDOMID" after script.min.js?version= in + // index.html + // We later use the same ID as a hacky cache mechanism for the .ms files + var ynh_assets_version = document.getElementsByTagName('script')[0].src.split("=")[1]; + // Get application context var app = Sammy.apps['#main']; var store = app.store; @@ -319,7 +325,7 @@ $('#modal').modal('hide'); // Render content - var rendered = this.render('views/'+ view +'.ms', data); + var rendered = this.render('views/' + view + '.ms?version=' + ynh_assets_version, data); // Update content helper var leSwap = function() {