-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Description
Today there are a few incompatibilities which make working of PWAs (Progressive Web Apps) difficult across browsers
Web app manifests - https://web.dev/add-manifest/
This a JSON file that tells the browser about your Progressive Web App and how it should behave when installed on the user's desktop or mobile device. There are a lot of incompatibilities across browsers even for “standard” web app manifest fields like scope, start_url and display. More details can be seen here - https://developer.mozilla.org/en-US/docs/Web/Manifest#browser_compatibility
Push notifications - https://web.dev/notifications/
This allows service to push messages to browser even when website is not opened. Push API, Notification API: requestPermission and ServiceWorkerRegistration API: showNotification today are not supported by iOS Safari. More details at below links:-
https://caniuse.com/?search=push%20api
https://caniuse.com/mdn-api_notification_requestpermission
https://caniuse.com/mdn-api_serviceworkerregistration_shownotification
Rationale
These incompatibilities make life of web developers difficult with respect to following:-
- Implementing features like Add to Home Screen with PWAs cannot be done in a consistent way
- Implementing push notifications via service worker is not possible in iOS Safari today
Specification
- https://w3c.github.io/manifest/
- https://www.w3.org/TR/push-api/
- https://notifications.spec.whatwg.org/#dom-notification-requestpermission
- https://notifications.spec.whatwg.org/#dom-serviceworkerregistration-shownotification
Tests
https://wpt.fyi/results/push-api?label=stable&label=master&aligned&view=subtest