Changeset b08b5bc in Klonkt for src/routes/admin-audio.js

Timestamp:
06/18/2026 04:30:54 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
85d9fda
Parents:
91d948c
Message:

SW: intercept navigations only — fix broken images after refresh

The service-worker fetch handler intercepted ALL GET requests with
fetch().catch(() => caches.match(request)). If the network fetch failed
briefly (e.g. during the daily SW version swap with skipWaiting+clients.claim),
caches.match for an uncached image returned undefined →
respondWith(undefined) → broken image on a normal refresh. Hard reload
bypasses the SW and therefore worked.

Now the SW only intercepts navigate requests (HTML) for an offline
fallback to the cached '/'; images/CSS/JS/media pass through natively.
CACHE_VERSION → v11 forces activation + cleanup of old caches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

(No files)

Note: See TracChangeset for help on using the changeset viewer.