[w3c/push-api] Declarative Web Push: mutable field (Issue #391)

As there was some pushback on this feature in #385 I thought I'd split it out separately for discussion. The reason we want `mutable` and the reason we'd like it to be part of the initial version of Declarative Web Push is because we think it offers robustness to web developers.

We'd like to end up in a world where when an end user opts into push message delivery, there's very little reason for those push messages to not arrive at their destination. Even when a lot of time has passed.

We also believe that websites like to have the ability to run JavaScript before a message is displayed to the end user.

However, as time goes on there's quite a bit of opportunity for user agents to remove website storage (and thus service workers) on behalf of the end user for a variety of reasons. In the current design that immediately influences the ability to show any kind of meaningful push message (as the service worker would have been fully responsible for that). In an alternative world with Declarative Web Push we can still deliver a meaningful message to the end user, even when the service worker was collected for one reason or another. We might not be able to make it `mutable` anymore (as the web developer wanted), but we'd at least be able to deliver something that the end user can act on.

Now if websites don't have the ability to get the equivalent of a `push` event with Declarative Web Push there's less incentive for them to start using it, which makes it harder for user agents to protect the interests of the end user. As such, we really feel `mutable` should be part of Declarative Web Push from day one and we should advocate for Declarative Web Push as a more robust means to deliver push messages to end users.

Now in our proposal `mutable` came with a `pushnotification` event, but there might also be ways to reuse the existing `push` event instead, if that would be more amenable.

cc @martinthomson @beverloo 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/391
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/push-api/issues/391@github.com>

Received on Wednesday, 18 September 2024 11:47:50 UTC