ReviewOS

stacks/ts-maps

Offline: document and support caching the app shell for fully offline cold starts

#6259
Closed chris opened this 8 days ago ·
8 days ago

Offline maps make the map, search and directions work with no connection. A fully offline cold start (opening the page with no network) also needs the app's own HTML, JS and CSS to be cached, which is outside the library.

Scope

  • A documented recipe in docs/concepts/offline.md: a small service worker that precaches the app shell, and optionally serves downloaded tiles from IndexedDB for requests the library doesn't make itself (e.g. <img> tags in popups).
  • Optionally ship a tiny helper (ts-maps/offline-sw) that apps can import into their service worker.
  • A playground demo that survives a hard reload with the network off.

Sign in to comment on this issue.