Apple’s Safari web browser has lagged behind some features in recent years, especially with background services. After years of waiting, it seems like Safari will finally support web push notifications on all platforms.
Following today’s WWDC event, Apple published a post on the WebKit Blog explaining what’s new in the Safari 16 Beta. Perhaps the most surprising addition is Web Push support, which is already functional on the macOS Ventura beta release. The feature will allow web sites and web apps to send push notifications, even when they are not open.
“Web Push is coming to Safari 16 on macOS Ventura,” Apple said in the blog post. “This lets you remotely send notifications to users of your websites and web apps — and deliver those notifications even when Safari isn’t running. It uses the same combination of web standards you may be familiar with from other browsers: Push API and Notifications API, along with Service Worker.”
Similar to Firefox, Safari will only allow a website to show a prompt to enable notifications after you’ve interacted with the page — for example, you won’t see the popup message right after a page loads, but you might see one after you click a link or button. That won’t stop the pages from showing buttons in the page for enabling notifications, but it will prevent Safari itself from spamming you.
Safari on macOS has technically supported push notifications since Mac OS X 10.9, but Safari’s notifications worked differently than push notifications other browsers — sites had to register for a paid Apple developer license, and the technology for sending alerts wasn’t similar at all. This new implementation uses the same push standard that every other browser uses, and sites don’t have to pay for Apple developer accounts to provide visitors with notifications.
Importantly, Apple says Web Push will arrive on the iPhone and iPad sometime in 2023. That’s a massive win for web apps on mobile Apple devices — you could always use alternative browsers on Mac if you needed push notifications, but Apple doesn’t allow third-party browser engines on iPhone and iPad. Web Push will make Progressive Web Apps better than ever on iPhone and iPad, as long as Apple doesn’t introduce any strange limitations or missing features.
Source: WebKit Blog