Skip to content

Commit

Permalink
prevent caching language files #332
Browse files Browse the repository at this point in the history
  • Loading branch information
psolom committed Jun 23, 2018
1 parent d30d661 commit 0ed5cee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -33,6 +33,7 @@
"uglify-js": "^3.0.27"
},
"dependencies": {
"node-sass": "^4.9.0",
"sass": "^1.0.0-beta.5.3"
}
}
5 changes: 4 additions & 1 deletion src/js/filemanager.js
Expand Up @@ -339,9 +339,12 @@ $.richFilemanagerPlugin = function(element, pluginOptions)
}
})
.then(function() {
// append query param to prevent caching
var langFileUrl = langModel.buildLangFileUrl(langModel.getLang()) + '?_=' + new Date().getTime();

return $.ajax({
type: 'GET',
url: langModel.buildLangFileUrl(langModel.getLang()),
url: langFileUrl,
dataType: 'json'
}).done(function(jsonTrans) {
langModel.setTranslations(jsonTrans);
Expand Down

0 comments on commit 0ed5cee

Please sign in to comment.