abinazebinoy commited on
Commit
f4791ec
·
1 Parent(s): 353faba

fix(sw.js): bump CACHE version to force clients off the poisoned cache

Browse files

The service worker caches app.js/api.js cache-first under a static
key. Editing those files alone does not force a refetch -- only
changing the service-worker script itself does. That let browsers
that had visited before the two syntax-error commits keep serving
old-but-working cached JS indefinitely, while new visitors got the
broken files straight from the network.

Bumping bharatgraph-v5 -> v6 invalidates the old cache on next visit.
Still requires one bump per deploy going forward; a content-hashed
cache name would remove that manual step as a follow-up.

Files changed (1) hide show
  1. frontend/sw.js +1 -1
frontend/sw.js CHANGED
@@ -3,7 +3,7 @@
3
  // NEW-A5 FIX: host === "hf.space" never matches -- HF uses *.hf.space subdomains
4
  // SW-01 FIX: use relative paths so caching works on GitHub Pages
5
 
6
- const CACHE = "bharatgraph-v5";
7
  const STATIC = [
8
  "./",
9
  "./index.html",
 
3
  // NEW-A5 FIX: host === "hf.space" never matches -- HF uses *.hf.space subdomains
4
  // SW-01 FIX: use relative paths so caching works on GitHub Pages
5
 
6
+ const CACHE = "bharatgraph-v6";
7
  const STATIC = [
8
  "./",
9
  "./index.html",