-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declarative Web Push: mutable field #391
Comments
What's the current understanding of this need? Can you list some use cases? |
This sounds like the expectation here is that clearing site data should exclude push notification. I think the current expectation is that clearing site data should remove everything for that site, and adding such exclusion could be confusing to users. A browser can have an auto-cleanup for sites that haven't been visited a while and in that case such exclusion would help, but perhaps sites with push notification can just be excluded from such auto cleanup? |
As I understand it this is expected functionality across most push platforms. It's why the
Yes, we think that there are scenarios that call for that distinction and we think it's ultimately up to the user agent to make these tradeoffs. It might well make sense to remove X MiB of storage now and preserve a X KiB push registration for over a year, in the event that the push message ends up being really important. There's also a distinction here in terms of end user engagement. They explicitly opted into the push message, but did not necessarily consent to large amounts of storage being used. |
Per an offline discussion with mt I'll be merging |
I figured that the discussion about Our understanding about its use case is mostly for analytics than actual mutability, and in that case we would prefer declarative methods (something like
Unless we find good use cases, our position currently inclines to be negative here. |
After having spoken to more developers, as well as having investigated more We're very interested in any proposal that enables the resource consumption of push notifications to decrease—primarily processing costs, secondarily storage costs. Disassociating push subscriptions from service workers is appealing as it removes the need for push-only service workers, and including the notification's contents directly in the push message is great for developer ergonomics and flexibility. However, given the above, the Because of that, our position should also be considered negative. |
How would offering something like ping/beacons help if the ecosystem doesn't want to change away from JavaScript? |
I read that as "they don't want to remove analytics" but more clarification would be good. |
While we wait for an answer, I thought I'd try to once more explain why we think declarative plus mutable is necessary.
|
Thank you for further explanation.
Can you elaborate how they would be blocked? Is an immediate callback absolutely needed or can that be delayed until user visits the website (via notification or just a usual visit), potentially with timestamps when they were shown? If it should be immediate, why? For other three points I agree, but given we all know fully migrating away from a shipped feature is extremely hard, I'd like to at least make sure we can achieve the efficiency from day 1, as that would be the strongest reason why we would implement this. |
Some need to be able to adjust the notification to be displayed based on information that is available locally, based on end user activity that might not have been synchronized with the server, for instance. I suspect an implementation could opt not to display the notification until the end user next visits the website, but that might defeat the purpose. Could still be an interesting enhancement to offer to end users though. |
Thanks. A few more questions:
|
If you use mutable with the intent to replace the notification, it's expected that the declarative notification serves as a fallback notification, not as a template or placeholder notification. And that declarative notification will be shown when the service worker cannot be invoked. |
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 feelmutable
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 apushnotification
event, but there might also be ways to reuse the existingpush
event instead, if that would be more amenable.cc @martinthomson @beverloo
The text was updated successfully, but these errors were encountered: