summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-15 05:20:25 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-15 05:20:25 +0900
commit17c6d647504e9da02fda4d67c367ecc578755d35 (patch)
tree1d23904b79125847c6740b23939858b6bf78b9f5 /src
parentImprove usability (diff)
downloadsharkey-17c6d647504e9da02fda4d67c367ecc578755d35.tar.gz
sharkey-17c6d647504e9da02fda4d67c367ecc578755d35.tar.bz2
sharkey-17c6d647504e9da02fda4d67c367ecc578755d35.zip
[Client] Prevent cache locale file
Diffstat (limited to 'src')
-rw-r--r--src/client/app/boot.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/app/boot.js b/src/client/app/boot.js
index c35620dc5a..f3b7304d19 100644
--- a/src/client/app/boot.js
+++ b/src/client/app/boot.js
@@ -43,6 +43,9 @@
if (`${url.pathname}/`.startsWith('/admin/')) app = 'admin';
//#endregion
+ // Script version
+ const ver = localStorage.getItem('v') || VERSION;
+
//#region Detect the user language
let lang = null;
@@ -67,7 +70,7 @@
let locale = localStorage.getItem('locale');
if (locale == null) {
- const locale = await fetch(`/assets/locales/${lang}.json`)
+ const locale = await fetch(`/assets/locales/${lang}.json?ver=${ver}`)
.then(response => response.json());
localStorage.setItem('locale', JSON.stringify(locale));
@@ -98,9 +101,6 @@
app = isMobile ? 'mobile' : 'desktop';
}
- // Script version
- const ver = localStorage.getItem('v') || VERSION;
-
// Get salt query
const salt = localStorage.getItem('salt')
? `?salt=${localStorage.getItem('salt')}`