Definition
Declarative Web Push
Declarative Web Push is a format where the push message payload itself is a JSON object describing the notification (title, body, icon, and so on) that the browser displays directly, rather than requiring a service worker's push event handler to run arbitrary JavaScript to call showNotification(). WebKit introduced it partly to allow more efficient and more private push delivery on iOS/Safari.
A declarative payload sets a specific content-encoding and a JSON body shaped like {"web_push": 8030, "notification": {"title": "New message", "body": "You have a new message", "navigate": "/inbox"}}, letting the OS render the notification without waking the page's JavaScript at all in the common case.
This differs from the traditional model, where every push wakes the service worker to execute a push event handler that must itself call self.registration.showNotification() — useful for custom logic, but heavier and, on some platforms, subject to tighter execution-time limits.
WebKit's stated motivation is battery and privacy: declarative pushes can be delivered and displayed without spinning up a JavaScript execution context for every single notification, and Safari on iOS adopted this model as part of its web push implementation.
See the WebKit blog post introducing the feature for the full payload schema and rationale: https://webkit.org/blog/16535/meet-declarative-web-push/.