Skip to content

Add web app manifest and offline page - #2009

Merged
TrystanLea merged 2 commits into
masterfrom
pwa-support
Oct 4, 2026
Merged

TrystanLea merged 2 commits into
masterfrom
pwa-support

Conversation

@TrystanLea

Copy link
Copy Markdown
Member

Replaces #1960.

  • `manifest.json` with relative URLs, so subfolder installs work.
  • Icons from Add Progressive Web App (PWA) support #1960, plus a padded maskable icon.
  • `theme-color`, `apple-mobile-web-app-capable` and manifest link in `Theme/theme.php`.
  • `service-worker.js` handles page loads only. Shows `Theme/offline.html` when the network fails. API, POST and asset requests are not intercepted. Only the offline page is cached.

Differences from #1960:

  • No caching of pages or API responses, so live data, logout and user separation are unaffected.
  • Asset caching left to the existing `?v=filemtime` versioning.

Notes:

  • Service workers need HTTPS or localhost. On plain http (typical emonPi LAN access) the worker does not register and install falls back to a shortcut.
  • On iOS an installed app has its own cookies, so users log in once inside the app.

Tested on localhost with Chrome: manifest and icons load, worker registers with scope at the emoncms root, offline page shown when offline, normal login page when back online.

🤖 Generated with Claude Code

TrystanLea and others added 2 commits October 2, 2026 08:12
@TrystanLea TrystanLea mentioned this pull request Oct 2, 2026
10 tasks done
@TrystanLea
TrystanLea changed the base branch from bootstrap5 to master October 4, 2026 19:36
@TrystanLea
TrystanLea merged commit df9eb59 into master Oct 4, 2026
8 checks 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