Offline
This page is generated from the project corpus and rewritten on every docs build. Edit the source in corpus/, not here.
The site has no offline copy. Until 2026-10-28 it was an installable PWA in two halves: a service worker precached the whole build on the first visit, and a button saved a trip's photographs. The map had already left offline in two steps, on 2026-10-23 and 2026-10-24. The owner dropped both halves on 2026-10-28 (decisions.md). The site still installs: the manifest and icons are untouched.
The worker that removes itselfโ
Deleting the old worker would not have taken it off anybody's phone. A browser
that runs a worker checks the worker's URL for an update; the server answers a
missing file with index.html, so the check fails, and the old worker stays in
charge, serving the old build from its cache for as long as the phone keeps it.
So public/sw.js is served at the old worker's address,
copied into the build as-is. A browser that still runs the old worker finds it
on its next update check and installs it, and it:
- takes over at once (
skipWaiting); - deletes every cache whose name starts with
trips-:trips-app-<build>,trips-fonts,trips-mediaand the oldertrips-tiles. Only those, because Cache Storage belongs to the origin, not to the path, and other apps share the origin; - claims the open pages in its scope, unregisters, then reloads each one with
WindowClient.navigate. The reloaded pages find no worker and come from the network.
It has no fetch handler, so nothing goes through it, the docs site under
docs/ included. Nothing in the app registers it: a browser that never ran the
old worker never meets it. It stays in the build for good, since there is no
telemetry to say when the last phone has updated.
What was checked (2026-10-28)โ
- Chromium (Playwright), against
vite preview: the old build's worker installed and in charge, with its caches and a cache of another app's; then the new build at the same address and one reload. The old build opened from the cache, the new worker took over, and the page reloaded itself into the new build within about four seconds: no registration, no controller, only the other app's cache left. A cold visit to the new build registers nothing and makes no cache. - Safari, from the compatibility data, not tested:
unregisteris there since Safari 11.1.WindowClient.navigateworks since Safari 16; from 11.1 to 15 it exists but always rejects. The worker catches that, so on those versions the caches go and the worker unregisters, but the open page stays on the old build until the reader's next visit, which finds no worker. An iPhone check after the deploy is an owner step.
Rules that keep it workingโ
- The server must serve
sw.jsas the file it is and must not put a longCache-Controlon it. The old worker was registered withupdateViaCache: 'none', which covers the browser but not a CDN in front of one. - Never delete or rename
public/sw.js, and never register it from the app. npm run devserves it too, so a worker left on a dev port by an old preview is removed the same way.