diff --git a/src/client/app/boot.js b/src/client/app/boot.js index f93cb407e8..9af58076e7 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -108,16 +108,11 @@ app = isMobile ? 'mobile' : 'desktop'; } - // Get salt query - const salt = localStorage.getItem('salt') - ? `?salt=${localStorage.getItem('salt')}` - : ''; - // Load an app script // Note: 'async' make it possible to load the script asyncly. // 'defer' make it possible to run the script when the dom loaded. const script = document.createElement('script'); - script.setAttribute('src', `/assets/${app}.${ver}.js${salt}`); + script.setAttribute('src', `/assets/${app}.${ver}.js`); script.setAttribute('async', 'true'); script.setAttribute('defer', 'true'); head.appendChild(script); @@ -155,9 +150,6 @@ localStorage.removeItem('locale'); - // Random - localStorage.setItem('salt', Math.random().toString().substr(2, 8)); - // Clear cache (service worker) try { navigator.serviceWorker.controller.postMessage('clear'); diff --git a/src/server/web/index.ts b/src/server/web/index.ts index 61878d880b..b51d6659c4 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -55,7 +55,6 @@ router.get('/assets/*', async ctx => { await send(ctx as any, ctx.path, { root: client, maxage: ms('7 days'), - immutable: true }); });