Link the app's code with a build number so a proxy cache cannot serve an old copy
build-container / build (push) Successful in 2m55s

The People screens did not appear after the redeploy even after a hard refresh: a caching layer
(for example Nginx Proxy Manager's "Cache Assets") was still serving the old app.js. The pages now
reference /app.js?v=<build>, /style.css?v=<build> etc., where the build changes with every release,
so a stale cached file at the old address is never used. The service worker no longer precaches
unversioned app code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-20 17:00:36 -04:00
1 parent 12a1e50a0e
commit 1a29d500d3
3 files changed
+10 -3

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
// App-shell cache only; Seafile/API traffic always goes to the network.
const CACHE = 'hub-v5';
const SHELL = ['/style.css', '/app.js', '/icon.svg', '/manifest.webmanifest', '/icons/icon-192.png', '/icons/apple-touch-icon.png'];
const CACHE = 'hub-v6';
const SHELL = ['/icon.svg', '/manifest.webmanifest', '/icons/icon-192.png', '/icons/apple-touch-icon.png'];
self.addEventListener('install', e => {
e.waitUntil(caches.open(CACHE).then(c => c.addAll(SHELL)));