The long-awaited support for web push notifications in Safari is finally here.
The latest version of Safari desktop (v16) on MacOS Ventura (v13) uses the Push API standard created by the W3C, instead of the legacy APNs protocol.
Safari was the first browser in history to allow notifications from websites (nearly a decade ago). However, since a standard was not present at that time, they created their own protocol for notifications.
After that, in 2015, Chrome added support for web push notifications using a W3C proposal, called “Push API”. In the next years several browsers (including Firefox and then Microsoft Edge) supported the same standard, which evolved over the years, becoming a reliable technology for push messages (i.e. messages that are sent from an application server to a browser, and that can be delivered in real-time even when the website is closed or the browser is closed).
The Push API offers several advantages over the legacy Apple protocol:
- It’s a standard technology supported by all major browsers
- You don’t need to sign up on the Apple website and you don’t need to purchase an Apple Developer program
- You don’t need to renew the Website Push ID Certificate every year for each website
- Better privacy, since the messages are encrypted and cannot be read by the push service
- No strange terms of service (e.g. Apple used to forbid certain types of notifications)
- Better scalability and exception handling thanks to the use of HTTP instead of custom protocols (that had low connection limits and were hard to debug)
- No hassle with “push packages”
- Better open source libraries and services are available for the web push standard
- Easier debugging, both on the server and on the client-side
- More options and features to control the behavior and appearance of notifications.
If you want more information you can read the Safari official documentation about Web Push Notifications.
Now that Safari desktop supports the standard for web push notifications, we need to wait the next year (2023) for iOS. Safari on iOS does not support the notifications yet, but this feature will be available soon.