Declarative Web Push simplifies notifications without JavaScript

New WebKit feature brings privacy and energy efficiency to web push, eliminating service worker requirements.

Visualizing Declarative Web Push protocol: JSON format, flow diagram, and key benefits for no-code web notifications
Visualizing Declarative Web Push protocol: JSON format, flow diagram, and key benefits for no-code web notifications

Four days ago, WebKit announced a significant enhancement to the Web Push protocol, aiming to deliver a more efficient and privacy-focused notification system for websites. The update, known as Declarative Web Push, marks a fundamental shift in how push notifications can be implemented across Apple platforms.

Technical details reveal privacy-first approach

According to Brady Eidson, who introduced the feature on March 27, 2025, Declarative Web Push enables developers to display user-visible notifications without requiring an installed service worker - the JavaScript code that previously managed notifications behind the scenes.

"Web Push notifications are a powerful and important part of the web platform," states Eidson in the announcement. "When we added Web Push to WebKit we knew it was imperative to maintain people's expectations of power efficiency and privacy."

The existing JavaScript-driven notification system presented two critical challenges: it consumed additional battery power to run code for displaying notifications, and it relied on service worker JavaScript, which conflicted with WebKit's approach to user privacy.

Traditional Web Push required service workers to handle push events and display notifications. If the service workers failed to show a notification promptly – due to bugs, networking issues, or device conditions – the push subscription would be revoked. This design was particularly problematic for privacy protection mechanisms like Intelligent Tracking Prevention (ITP), which deletes website data for sites not visited recently, including service worker registrations.

How Declarative Web Push functions

Declarative Web Push introduces a standardized JSON format for push messages that guarantees browsers have sufficient information to display notifications without executing JavaScript. This consists of a top-level "web_push" value (an homage to RFC 8030), a "notification" dictionary describing visible content (with a required "title"), and a "navigate" value specifying the URL to open when users activate the notification.

The technical implementation exposes window.pushManager to support subscription management without requiring a service worker, making the system more robust against data clearing by privacy features.

The WebKit announcement provides detailed code examples of how to implement these features:

const subscription = await window.pushManager.subscribe({
 userVisibleOnly: true,
 applicationServerKey: arrayForPublicKey
});

Importantly, this architecture ensures push messages can never be "silent" - they must always display a notification to the user, which prevents potential privacy violations and unwanted battery drain from background processes.

Real-world impacts on mobile engagement

This development comes as mobile engagement metrics show increasing importance of push notifications across industries. According to Airship's 2025 Mobile App Push Notification Benchmarks, customers who opt in to push notifications have 13% more purchases compared to opted-out customers, with top-performing applications seeing purchase lifts as high as 39%.

The report, which analyzed data from over 9 billion app users across thousands of apps in 13 industry verticals, shows varying opt-in rates and engagement metrics across platforms. While Android has traditionally maintained higher opt-in rates than iOS, both platforms show similar patterns of direct open rates, with the most successful brands achieving rates between 7-20% depending on the industry.

With the introduction of Declarative Web Push, these metrics may shift as web notifications become more reliable and privacy-friendly on Apple platforms.

Cross-platform compatibility maintained

One of the most significant aspects of Declarative Web Push is its backward compatibility with existing Web Push implementations. Websites can standardize on the declarative JSON format and still function with browsers that don't yet support the declarative approach.

"If your push message arrives to a newer browser, it's handled declaratively by the browser. If it arrives to an older browser, it's handled imperatively by JavaScript as it always had been," explains Eidson.

For applications requiring more complex notification handling, the service worker can still process incoming messages, modify notifications, and access local data. Similar to iOS native apps' UNNotificationServiceExtension, web services can run short code snippets to modify notifications while maintaining the declarative message as a fallback.

Standards work underway

WebKit has been actively pursuing standardization of Declarative Web Push. The team approached other browser vendors at TPAC 2023 and has made formal proposals to various specifications during 2024, including:

  • Additions to the Notifications API enabling notifications to navigate without JavaScript after user interaction
  • Declarative Web Push specifications against the Push API
  • Exposing pushManager on Window against the Push API

These efforts signal a commitment to making this approach widely available across browsers, though full adoption will take time.

Marketing implications

For marketers, this development has several important implications. First, it simplifies the technical requirements for implementing web push notifications, potentially making them more accessible to websites without extensive development resources. Second, it improves the reliability of notifications on Apple platforms, where privacy features previously created challenges.

The change also coincides with broader shifts in notification behavior, as both Apple and Google introduce features giving users more control over push notifications. According to Airship's research, personalization remains the single most important factor in boosting notification open rates, with tailored messages resulting in a 37% increase on average.

Brands implementing segmentation for push notifications see direct open rate increases between 18-65%, and as high as 334% in some cases. As notification systems evolve, marketers will need to focus even more on relevance and proper timing to prevent customer notification fatigue.

Timeline of Web Push Evolution

  • Prior to 2023: Web Push required service workers to manage notifications on all platforms
  • 2023: WebKit team introduces the concept of Declarative Web Push at TPAC
  • Early 2024: Formal proposals made to web standards bodies
  • March 27, 2025: WebKit announces Declarative Web Push feature
  • March 31, 2025: Feature now available for developers to implement
  • Future: Potential wider adoption across other browser vendors

This development represents a significant step forward in making web push notifications more robust, private, and energy-efficient, while maintaining the cross-platform nature that makes the web platform valuable to developers and businesses.