Skip to content

fix(pwa): offline start from the home screen - #100

Merged
ssalentin merged 1 commit into
mainfrom
fix/pwa-start
Nov 7, 2026
Merged

ssalentin merged 1 commit into
mainfrom
fix/pwa-start

Conversation

@ssalentin

Copy link
Copy Markdown
Owner

What

The manifest starts the installed app at /?source=pwa, but the service worker cached pages under the exact request URL. The plain start page is cached as /, so launching the PWA from the home screen missed the cache and landed on /offline.html whenever the network was unavailable.

  • pageCacheKey() drops source and utm_* (and the fragment) from page URLs; filters, sorts and offsets stay part of the key.
  • The service worker caches and looks up page responses under that key.
  • apple-touch-icon pointed at the maskable icon (over-padded on the iOS home screen); it now uses the regular 192px icon.

Checks

  • npm run check 0/0, npm test 455 passed (3 new tests for start URL, real query params, campaign params), npm run build ok.
  • Cache Storage probe in a local build: page requests are stored under the normalised key; Source/UTM variants map to the same entry.

@ssalentin
ssalentin merged commit cbfc70c into main Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant