Skip to content

Add installable PWA and offline cache - #3

Merged
aliorhun merged 1 commit into
mainfrom
feat/pwa-support
Sep 27, 2026
Merged

aliorhun merged 1 commit into
mainfrom
feat/pwa-support

Conversation

@aliorhun

Copy link
Copy Markdown
Contributor

Summary

Implements items 7–9 in one PWA-focused change set:

  • add manifest.webmanifest with relative start_url / scope for GitHub Pages subpaths
  • add 192×192 and 512×512 MathNote app icons, including maskable support
  • register a service worker only on HTTP/HTTPS so direct file:// usage remains supported
  • precache the generated application shell, bundle, styles, KaTeX fonts, manifest and icons
  • use a content-derived cache version for each build
  • remove stale MathNote caches when a new service worker activates
  • provide offline navigation fallback to the cached app shell
  • extend the existing offline verifier with PWA/manifest/service-worker checks
  • document installable PWA behavior

GitHub Pages compatibility

All PWA URLs are relative (./...) so deployment works at:
https://alorak.github.io/mathnote/

The existing Pages workflow continues to publish dist/; the build now adds:

  • manifest.webmanifest
  • sw.js
  • icons/icon-192.png
  • icons/icon-512.png

Cache/update behavior

Each build hashes the generated distribution and creates a cache name such as:
mathnote-<content-hash>

On activation, older mathnote-* caches are deleted and the new service worker takes control.

@aliorhun
aliorhun merged commit e8486f5 into main Sep 27, 2026
2 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