Google Announces Web Budget API Support in Chrome 60

Google has announced that, starting with Chrome 60, it will support the Web Budget API. The new W3C API can be used to retrieve budget amounts associated with background operations, as well as the cost associated with such operations. Google pitches the API as an improvement over the Push Messaging API as developers can now perform some level of background work without informing the user.

Once implemented, the API introduces a budget concept whereby each site has a designated amount of resources based on user engagement. Developers can consume certain levels of the budget for background activities (e.g. silent push). Each activity will deplete the budget to some extent. Once the budget is depleted, the developer can no longer perform background actions without the user knowing. The user agent is responsible for determining the budget level for a specific web app.

In Chrome 60, Google will only support a silent push from a background operation standpoint. However, the W3C has included a number of operation types in the specification. When planning for budget use, developers can use the getBudget() and getCost() methods. The reserve() method allows developers to request a budget for a specific operation. Currently, the W3C specification does not define how agents establish or store the current budget. Rather, the specification aims to expose information to make the budget useful for authors without restricting implementation details.

The API is not a W3C standard, nor is it on the roadmap to become one. To learn more about licensing and support, visit the W3C docs. The specification was published by the Web Platform Incubator Community Group. For more information on the license, check out the CLA specifics.

Be sure to read the next Browsers article: Mozilla Adds Three Experimental Features to Firefox through Test Pilot Program