fec-pwa-implementation
Installation
SKILL.md
PWA implementation
Purpose
Make web applications installable, offline and controllable to update.
Procedure
- Confirm whether PWA is worth doing: priority is given to mobile/desktop installations, weak network offline, and repeated access scenarios; do not force PWA when it is purely internal backend, has strong real-time streaming media, or only requires ordinary caching.
- First complete the manifest, icon, theme color and HTML reference; the icon covers at least 192/512, Android needs to be maskable, and iOS needs apple touch icon.
- Register the Service Worker and design an update prompt; do not forcefully refresh the user page after silently
skipWaiting(). - Use Workbox or framework plug-in to manage precache/runtime cache; sensitive requests such as login, payment, and permission changes must go through the network.
- Provide offline fallback page and installation prompt UI, and verify initial loading, offline access, update activation, uninstallation and reinstallation.
Detailed reference
- Load references/manifest-and-icons.md when manifest fields, HTML references, icon requirements, screenshots, and iOS notes are required.
- Load references/service-worker-workbox.md when Service Worker registration, Workbox policy, Vite integration, offline backup and update process are required.