WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
319860
Tag-based notification coalescing does not work with Declarative Web Push on iOS 18.4
https://bugs.webkit.org/show_bug.cgi?id=319860
Summary
Tag-based notification coalescing does not work with Declarative Web Push on ...
hugo94490
Reported
2026-07-20 17:58:33 PDT
## Summary When sending Declarative Web Push notifications (`web_push: 8030`) with a consistent `tag` value in the `notification` dictionary, iOS 18.4 does **not** coalesce (replace in-place) an existing visible notification with the same tag. Instead, notifications stack as separate banners in the Notification Center. This behavior contradicts the W3C Notifications API specification, which states that calling `showNotification()` with a `tag` matching an existing notification should replace it. Since Declarative Web Push states that *"most of the optional members of the NotificationOptions dictionary can also be specified"* and `tag` is a core member of `NotificationOptions`, the expectation is that the OS-level declarative handler should respect `tag` for coalescing — the same way a Service Worker calling `showNotification()` with a matching `tag` would on other platforms. ## Environment - **Device**: iPhone (iOS 18.4.x) - **Browser**: Safari / Home Screen Web App (PWA) - **Delivery**: Standard Web Push via APNs with VAPID authentication - **Format**: Declarative Web Push JSON (`web_push: 8030`) ## Steps to Reproduce 1. Save a PWA to the Home Screen on an iOS 18.4+ device. 2. Subscribe to Web Push via `window.pushManager.subscribe()` (or `ServiceWorkerRegistration.pushManager.subscribe()`). 3. From the backend, send a first push message: ```json { "web_push": 8030, "notification": { "title": "Download Progress", "body": "25% complete", "tag": "download-42", "navigate": "
https://example.com/downloads/42
", "silent": true } } ``` 4. Observe the notification appears on the lock screen / Notification Center. 5. Send a second push message with the **exact same `tag`**: ```json { "web_push": 8030, "notification": { "title": "Download Progress", "body": "50% complete", "tag": "download-42", "navigate": "
https://example.com/downloads/42
", "silent": true } } ``` 6. Send a third push message with the same `tag`: ```json { "web_push": 8030, "notification": { "title": "Download Progress", "body": "100% complete", "tag": "download-42", "navigate": "
https://example.com/downloads/42
", "silent": false } } ``` ## Expected Behavior Each subsequent notification with `"tag": "download-42"` should **replace the previous one in-place**, resulting in a single notification visible at any time — just as the W3C Notifications API specifies for the `tag` attribute, and just as Android Chrome handles it. ## Actual Behavior All three notifications appear as **separate, stacked banners** in the Notification Center. The `tag` value is accepted and parsed but does not trigger in-place replacement of the existing notification. This behavior is identical regardless of whether: - The `tag` value is a simple ASCII string (`download-42`) or a base64url-encoded string - The RFC 8030 `Topic` HTTP header is also set to the same value as the JSON `tag` - The `silent` flag is `true` or `false` - The `mutable` flag is present or absent ## Additional Context ### Historical precedent: WebKit
Bug 258922
This appears to be a continuation of the same underlying issue tracked in [WebKit
Bug 258922
](
https://bugs.webkit.org/show_bug.cgi?id=258922
) ("Push notifications with same tag do not replace each other"), originally reported in July 2023 against the imperative `showNotification()` path. The introduction of Declarative Web Push in iOS 18.4 was expected to resolve this, since the OS now handles notification rendering natively (bypassing the Service Worker), but the native rendering layer appears to suffer from the same `tag` coalescing gap. ### Impact This bug severely impacts any web application that needs to update a notification in real-time. Without working `tag` coalescing, these applications must either: 1. Spam the user with dozens of stacked notifications (unacceptable UX), or 2. Use `mutable: true` with a Service Worker that manually calls `getNotifications()` + `close()` + `showNotification()` to simulate coalescing — which reintroduces the energy cost, race conditions, and visual flashing that Declarative Web Push was designed to eliminate. ### Comparison with native iOS apps Native iOS apps using `UNNotificationRequest` with a consistent `identifier` string reliably replace visible notifications in-place. The expectation is that the Declarative Web Push `tag` should map to this same native identifier mechanism. ### Comparison with other browsers - **Chrome on Android**: `tag`-based coalescing via `showNotification()` works flawlessly. - **Chrome on Desktop**: `tag`-based coalescing works flawlessly. - **Firefox on Desktop**: `tag`-based coalescing works flawlessly. - **Safari on iOS 18.4**: `tag` is parsed but does **not** trigger coalescing (this bug). ## Suggested Fix When WebKit's Declarative Web Push handler constructs a `UNNotificationRequest` to hand to `UNUserNotificationCenter`, it should map the W3C `tag` string to the native `UNNotificationRequest.identifier` parameter. This would cause iOS to natively replace any existing notification with the same identifier, achieving seamless in-place coalescing without any JavaScript execution. ## Where to File - **WebKit Bugzilla**: [
https://bugs.webkit.org](https://bugs.webkit.org
) — Component: `WebKit` → `Notifications` - **WebKit GitHub**: [
https://github.com/nicurban/nicurban/nicurban.git](https://github.com/nicurban/nicurban/nicurban.git
) — Issues - **Apple Feedback Assistant**: [
https://feedbackassistant.apple.com](https://feedbackassistant.apple.com
) — Category: Safari / WebKit
Attachments
Add attachment
proposed patch, testcase, etc.
hugo94490
Comment 1
2026-07-20 18:03:27 PDT
## Summary When sending Declarative Web Push notifications (`web_push: 8030`) with a consistent `tag` value in the `notification` dictionary, iOS 18.4 does **not** coalesce (replace in-place) an existing visible notification with the same tag. Instead, notifications stack as separate banners in the Notification Center. This behavior contradicts the W3C Notifications API specification, which states that calling `showNotification()` with a `tag` matching an existing notification should replace it. Since Declarative Web Push states that *"most of the optional members of the NotificationOptions dictionary can also be specified"* and `tag` is a core member of `NotificationOptions`, the expectation is that the OS-level declarative handler should respect `tag` for coalescing — the same way a Service Worker calling `showNotification()` with a matching `tag` would on other platforms. ## Environment - **Device**: iPhone (iOS 18.4.x) - **Browser**: Safari / Home Screen Web App (PWA) - **Delivery**: Standard Web Push via APNs with VAPID authentication - **Format**: Declarative Web Push JSON (`web_push: 8030`) ## Steps to Reproduce 1. Save a PWA to the Home Screen on an iOS 18.4+ device. 2. Subscribe to Web Push via `window.pushManager.subscribe()` (or `ServiceWorkerRegistration.pushManager.subscribe()`). 3. From the backend, send a first push message: ```json { "web_push": 8030, "notification": { "title": "Download Progress", "body": "25% complete", "tag": "download-42", "navigate": "
https://example.com/downloads/42
", "silent": true } } ``` 4. Observe the notification appears on the lock screen / Notification Center. 5. Send a second push message with the **exact same `tag`**: ```json { "web_push": 8030, "notification": { "title": "Download Progress", "body": "50% complete", "tag": "download-42", "navigate": "
https://example.com/downloads/42
", "silent": true } } ``` 6. Send a third push message with the same `tag`: ```json { "web_push": 8030, "notification": { "title": "Download Progress", "body": "100% complete", "tag": "download-42", "navigate": "
https://example.com/downloads/42
", "silent": false } } ``` ## Expected Behavior Each subsequent notification with `"tag": "download-42"` should **replace the previous one in-place**, resulting in a single notification visible at any time — just as the W3C Notifications API specifies for the `tag` attribute, and just as Android Chrome handles it. ## Actual Behavior All three notifications appear as **separate, stacked banners** in the Notification Center. The `tag` value is accepted and parsed but does not trigger in-place replacement of the existing notification. This behavior is identical regardless of whether: - The `tag` value is a simple ASCII string (`download-42`) or a base64url-encoded string - The RFC 8030 `Topic` HTTP header is also set to the same value as the JSON `tag` - The `silent` flag is `true` or `false` - The `mutable` flag is present or absent ## Additional Context ### Historical precedent: WebKit
Bug 258922
This appears to be a continuation of the same underlying issue tracked in [WebKit
Bug 258922
](
https://bugs.webkit.org/show_bug.cgi?id=258922
) ("Push notifications with same tag do not replace each other"), originally reported in July 2023 against the imperative `showNotification()` path. The introduction of Declarative Web Push in iOS 18.4 was expected to resolve this, since the OS now handles notification rendering natively (bypassing the Service Worker), but the native rendering layer appears to suffer from the same `tag` coalescing gap. ### Impact This bug severely impacts any web application that needs to update a notification in real-time. Without working `tag` coalescing, these applications must either: 1. Spam the user with dozens of stacked notifications (unacceptable UX), or 2. Use `mutable: true` with a Service Worker that manually calls `getNotifications()` + `close()` + `showNotification()` to simulate coalescing — which reintroduces the energy cost, race conditions, and visual flashing that Declarative Web Push was designed to eliminate. ### Comparison with native iOS apps Native iOS apps using `UNNotificationRequest` with a consistent `identifier` string reliably replace visible notifications in-place. The expectation is that the Declarative Web Push `tag` should map to this same native identifier mechanism. ### Comparison with other browsers - **Chrome on Android**: `tag`-based coalescing via `showNotification()` works flawlessly. - **Chrome on Desktop**: `tag`-based coalescing works flawlessly. - **Firefox on Desktop**: `tag`-based coalescing works flawlessly. - **Safari on iOS 18.4**: `tag` is parsed but does **not** trigger coalescing (this bug). ## Suggested Fix When WebKit's Declarative Web Push handler constructs a `UNNotificationRequest` to hand to `UNUserNotificationCenter`, it should map the W3C `tag` string to the native `UNNotificationRequest.identifier` parameter. This would cause iOS to natively replace any existing notification with the same identifier, achieving seamless in-place coalescing without any JavaScript execution.
Alexey Proskuryakov
Comment 2
2026-07-20 18:44:57 PDT
Thank you for the report! Can you clarify if this is only on iOS 18.4, which is quite old at this point?
hugo94490
Comment 3
2026-07-20 18:52:19 PDT
Thanks for getting back to me! To clarify, this issue is not exclusive to iOS 18.4—it affects all current iOS releases to this day. I referenced iOS 18.4 specifically because that was the release that introduced Declarative Web Push (web_push: 8030), which fundamentally changed how notifications are processed. However, the core issue—tag failing to trigger in-place coalescing on iOS—has existed since Web Push was first introduced to iOS: Pre-Declarative Web Push (iOS 16.4 – 18.3): When using standard imperative Web Push, calling showNotification({ tag: 'my-tag' }) from the Service Worker resulted in stacking instead of replacing. (This was originally tracked in
Bug 258922
). To work around this, developers had to use a slow, energy-expensive manual queue using getNotifications() and .close() before showing the new one. Post-Declarative Web Push (iOS 18.4 – Present): When Declarative Web Push was introduced to improve efficiency and privacy, the OS took over the rendering pipeline entirely, bypassing the Service Worker. The expectation was that the native declarative parser would finally map the W3C tag property to UNNotificationRequest.identifier, solving the coalescing problem at the OS level. Unfortunately, it doesn't. EDIT: i tried to edit the issue but couldn't... mayeb i'm missing a feature here but yeah
hugo94490
Comment 4
2026-07-20 18:52:19 PDT
Thanks for getting back to me! To clarify, this issue is not exclusive to iOS 18.4—it affects all current iOS releases to this day. I referenced iOS 18.4 specifically because that was the release that introduced Declarative Web Push (web_push: 8030), which fundamentally changed how notifications are processed. However, the core issue—tag failing to trigger in-place coalescing on iOS—has existed since Web Push was first introduced to iOS: Pre-Declarative Web Push (iOS 16.4 – 18.3): When using standard imperative Web Push, calling showNotification({ tag: 'my-tag' }) from the Service Worker resulted in stacking instead of replacing. (This was originally tracked in
Bug 258922
). To work around this, developers had to use a slow, energy-expensive manual queue using getNotifications() and .close() before showing the new one. Post-Declarative Web Push (iOS 18.4 – Present): When Declarative Web Push was introduced to improve efficiency and privacy, the OS took over the rendering pipeline entirely, bypassing the Service Worker. The expectation was that the native declarative parser would finally map the W3C tag property to UNNotificationRequest.identifier, solving the coalescing problem at the OS level. Unfortunately, it doesn't. EDIT: i tried to edit the issue but couldn't... mayeb i'm missing a feature here but yeah
Radar WebKit Bug Importer
Comment 5
2026-07-27 17:59:11 PDT
<
rdar://problem/183376730
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug