refactor(pwa): drop the unreachable precached-shell fallback

Without a connection a navigation also looked for itself in the static
cache, which only ever holds icons and catalogs; `/` is never
precached, and the install step deleted a leftover root document only
so that this lookup could not find it. Both go; the page cache and the
offline page remain.
This commit is contained in:
Marc-André Bombeck committed 2026-11-11 20:41:05 +01:00
1 parent 09f3280c1c
commit a824484d4a
2 files changed
+10 -45

No files matched your search

-9
View File
@@ -548,15 +548,6 @@ describe("sw.js — networkFirst offline fallback", () => {
expect(await res.text()).toBe("current shell");
});
it("falls back to the current-version precached shell when the page cache misses", async () => {
const harness = bootServiceWorker();
const statics = await harness.cacheStorage.open(CURRENT_STATIC_CACHE);
await statics.addAll(["/"]);
const res = await dispatchNavigationFetch(harness, "/");
expect(await res.text()).toBe("precached:/");
});
it("consumes the navigation-preload response instead of re-fetching", async () => {
const harness = bootServiceWorker();
let fetchCalls = 0;