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

Thanks. A few more questions:

1. In the case you mentioned, what would be the expected behavior when there's no service worker to run push event for `mutable`, either because the user agent cleanup of site data or the subscription is via Window's PushManager?

2. App servers would be able to send a payload with empty placeholder values even for the required values, e.g.

   ```
   {
     "web_push": 8030,
     "notification": {
       "title": "placeholder",
       "navigate": "https://placeholder.com"
     },
     "mutable": true
   }
   ```
   (I filled everything with placeholder here, but in actual cases the servers would want to only pick certain fields for placeholder)

   And then the service worker would call `registration.showNotification()` based on the values it got from the local data. This would work as long as the site data is not cleanup by the user agent, but after that the user would either get no notification or a broken one. If no notification, `mutable` wouldn't grant any advantage over the current SW-based push subscription. Or if a broken notification with placeholders, the user would be surprised by the sudden breakage.

    Would there be a way to let the site data cleanup happen while still preserving the push behavior after that?

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

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

Received on Thursday, 13 February 2025 11:07:26 UTC