pushSubs Firestore collection.
Turning them on
Open the installed app, sign in, and tap Allow notifications. A test notification is sent. After that the bell icon only shows the state, and tapping it sends another test.How a tap opens the mail
- A small mail (up to about 3.5 KB) travels inside the push itself.
- Every push also carries a short-lived read token for that one mail.
- The service worker saves the mail on the phone while it shows the notification.
- If you tap before that has finished, the app opens the reader straight away and fetches just that mail with the token, with no sign-in and no sync.
- Only if that is not possible, for example when the phone is offline, does the app sync first and then open the mail.
Android app
Phones with the Android app are notified through Firebase Cloud Messaging instead of Web Push. The server sends both, so a phone with the app should have the PWA’s notifications turned off.Offline phones
The push service holds an undelivered notification for 7 days (PUSH_TTL in server.js) and delivers it when the phone reconnects, even if the app is closed.
Keeping it reliable
The app re-checks its subscription on every start and whenever it comes back to the front, and starts over if the server’s VAPID key has changed, so an update does not silently turn notifications off.Device tips
A phone stops being notified if its browser data is cleared. Open the app once and allow notifications again.Copyright © 2025–2026 Amit Dutta