Primary eng (and PM) emails
Link to “Intent to Deprecate” thread
Summary
In 2011 Chrome implemented the following prefixed
proposed quota API:
- window.webkitStorageInfo.queryUsageAndQuota()
- window.webkitStorageInfo.requestQuota()
Once this design got a bit more review it was folded into a
Quota API spec, renaming the entry points and moving them to
navigator so it could be used from workers. The old API was left in parallel with a deprecation message logged to console. The old API was never implemented by any other browser.
Motivation
We plan to ship a more modern API (
navigator.storage.estimate()) soon - Firefox has it implemented behind a flag. Up until
recently we had 4 web-facing quota APIs (2 prefixed, 2 experimental) - we'd like to have as clean a story as possible here before we promote usage of the new API.
Compatibility And Interoperability Risk
- Edge: Not supported
- Firefox: Not supported - new navigator.storage.estimate() API implemented behind a flag pending further work
- Safari: Not supported
- Web developers: No signals.
Alternative implementation suggestion for web developers
The deprecation warning suggests:
'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.
Which is true. Of course, that's another API that's not had adoption outside of Chrome. Another approach would be to wait until the new hotness is ready and shipping in two browsers, then proceed with deprecating both of the old prefixed APIs. Reviewing the numbers, though, ditching this one now seems plausible.
Usage information from UseCounter
The top level use counter (
PrefixedStorageInfo) reports
0.6% but enumerating the global properties (common!) will tick it, so it can't be trusted to reflect actual usage. Two more histograms were
added to track the actual methods. Those haven't hit stable but relative to the top level counter the 28 day aggregation for dev we can do some math:
- V8DeprecatedStorageInfo_QueryUsageAndQuota_Method: 0.003% (estimated)
- V8DeprecatedStorageInfo_RequestQuota_Method: 0.00006% (estimated)
The former is on the edge for our deprecation threshold. We can also wait for those metrics to hit stable.
For reference, the suggested replacement API
navigator.webkitTemporaryStorage (etc)
numbers are
0.5% (top level) and the actual method usage is around
0.02% (estimated - hasn't hit stable yet). We're going to be living with that one for quite some time, it seems.
OWP launch tracking bug
Entry on the feature dashboard
Will file if approved.