fix: make server header changes reach installed PWA clients
Docker Build and Publish / build-and-push (push) Failing after 10s
Docker Build and Publish / build-and-push (push) Failing after 10s
The service worker precaches index.html together with its response headers, so a server-only change never reaches an installed client: the client build is byte-identical, the precache manifest is unchanged, and the worker has no reason to update. That is why the CSP fix in 1.6.1 did not reach a browser that already had the app cached — it kept replaying a cached shell carrying the old, broken CSP, indefinitely. The release version is now compiled into the client, which makes every release change the bundle hash, hence index.html, hence its precache revision, hence sw.js itself — the bytes browsers compare to decide whether to update. Verified by bumping only the version: index-DYufL2Fa.js -> index-60N_3d5j.js, with the new name carried into the sw.js manifest. It also surfaces in the footer, so the deployed version is visible without digging through devtools. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011uBWhwV3wFQ5MBCcMHHem7
This commit is contained in:
co-authored by
Claude Opus 5
parent
30ff8de1e8
commit
ff45b6d898
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "instaarchive-viewer",
|
||||
"private": true,
|
||||
"version": "1.6.1",
|
||||
"version": "1.6.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --port=3000 --host=0.0.0.0",
|
||||
|
||||
Reference in New Issue
Block a user