Contact emails
jsb...@chromium.org,dk...@chromium.org
Spec
https://storage.spec.whatwg.org
Summary
Introduce navigator.storage.estimate(). Returns a Promise resolving to {usage, quota} values in bytes.
Motivation
Web apps using storage for offline or caching purposes need to answer questions like:
* Do I have enough storage available to let the user save this media file for for offline use?
* How many documents should I attempt to transparently cache for offline use?
* How many items should I cache for quick display on slow connections?
Notably, they want to do this from Service Workers.
Chrome has two (!) other equivalent quota APIs implemented:
Interoperability and Compatibility Risk
Ongoing technical constraints
The proposed implementation (https://codereview.chromium.org/1855623002) reuses most of the existing plumbing and just skins it with a new API, so this does not e.g. introduce new IPC plumbing. Assuming this eventually ships we can back out at least some of the other quota API code.
This lives on a new navigator.storage object added as part of the Durable Storage work, which has not yet shipped. If these don't ship at the same time we'll need to rejigger the flags.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes or no. If no, explain why certain platforms will not be included in your implementation.
OWP launch tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/5630353511284736
Requesting approval to ship?
Yes.