4 ms·
No - it doesn't. Quote: "This specification does not define how user agents establish or store the amount of current budget. It aims to define an API that expo
by swsieber 9y ago
No - it doesn't. Quote:
"This specification does not define how user agents establish or store the amount of current budget. It aims to define an API that exposes sufficient information to make the budget useful for authors, while not restricting the implementation details and heuristics specific to a user agent."
So basically, the Push API and Web Background Synchronization actually do that. This just lets pages programmatically find out what the limits are like.
To make an analogy to localStorage - this api is like being able to query local storage for how much space is available, and how often it gets deleted.
- RussianCow 9y agoSo what you're saying is that browsers already allow limited things like push notifications to happen silently without user consent, and this API just exposes the budget/cost for those actions? I'm not up-to-date on the background APIs that browsers expose, but this quote from the Google doc seems to be at odds with what you're saying, if I understand it correctly: "The Push Messaging API enables us to send notifications to a user even when the browser is closed. [...] but the API has one important restriction: you must always display a notification for every single push message recieved." And later: "The Budget API, is a new API designed to allow developers to perform limited background work without notifying the user, such as silent push or performing a background fetch." Edit: Reading through the spec more closely, it appears you are correct in that this is already happening on the browser side, and that this API just exposes the budgeting details to the developer. The Google Developer page's wording is just somewhat misleading. Thanks for the clarification.
- rictic 9y agoPush notifications – by spec and by all implementations I'm aware of – must not be sent without explicit user consent: https://w3c.github.io/push-api/#security-and-privacy-considerations https://w3c.github.io/push-api/#security-and-privacy-conside...
- RussianCow 9y agoSorry, when I said "without user consent" I really meant "with the tab closed". :) Brain fart.