summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/serviceworker.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/serviceworker.js')
-rw-r--r--web_src/js/features/serviceworker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/serviceworker.js b/web_src/js/features/serviceworker.js
index 23d68bced0..a072811b04 100644
--- a/web_src/js/features/serviceworker.js
+++ b/web_src/js/features/serviceworker.js
@@ -1,6 +1,6 @@
import {joinPaths, parseUrl} from '../utils.js';
-const {useServiceWorker, assetUrlPrefix, appVer, assetVersionEncoded} = window.config;
+const {useServiceWorker, assetUrlPrefix, assetVersionEncoded} = window.config;
const cachePrefix = 'static-cache-v'; // actual version is set in the service worker script
const workerUrl = `${joinPaths(assetUrlPrefix, 'serviceworker.js')}?v=${assetVersionEncoded}`;
@@ -25,7 +25,7 @@ async function invalidateCache() {
}
async function checkCacheValidity() {
- const cacheKey = appVer;
+ const cacheKey = assetVersionEncoded;
const storedCacheKey = localStorage.getItem('staticCacheKey');
// invalidate cache if it belongs to a different gitea version