r/PWA • u/StatusAd7379 • 4d ago
Offline PWA for First Aid using HTML, vanilla CSS and JS
PWA
Codebase
Please check out this offline-first Progressive Web App built with HTML, vanilla CSS, and JS for people without medical training, using the Meghalaya State Disaster Management Authority (NDMA-funded) Basic First Aid Manual as a reference. Everything is cached locally via a service worker so it works without network access during emergencies. I want to expand it to cover more emergency situations and make it clearer and more accessible across India (including regional languages and low-connectivity edge cases). Feedback and contributions are very welcome.
1
u/Dry_Recognition_3070 2d ago
For an emergency app, the biggest thing is making sure the precache list really covers everything, including fonts, icons and every language file, since one missing asset breaks the offline page at the worst moment. Version your cache name and delete old caches in the activate step so users don't get stuck on stale content after you update the manual. Test it by loading once, switching to airplane mode, and hard-reloading on a phone, because desktop DevTools offline mode hides some failures. Also consider calling navigator.storage.persist() and showing a clear 'ready for offline use' message so people know the download finished before they need it. For regional languages, lazy-caching each language pack on demand with a visible download button keeps the first install small on weak connections.