Open
Description
We've had a frequent request from users of estimate()
to provide an per storage type breakdown estimation. For example, something like:
{
quota: 440922000000,
usage: 27300000,
details: {
indexeddb: 676000,
cacheapi: 26500000,
serviceworker: 52800
}
}
This stems from web apps that have supported for years and/or where multiple apps are present within an origin makes reasoning about what is using up storage difficult. Also exacerbating the problem:
- Storage APIs don't simply store bytes. There's encoding, metadata, compression, padding, and so on.
- Not all APIs allow enumeration (e.g. API to enumerate databases w3c/IndexedDB#31)
Lots of details to figure out, but:
- Numbers would be estimates.
- No need for everything to add up to the "usage" value. There should be an understanding that there will overhead/metadata in the system.
- Would add hooks to this spec to allow other storage specs to define the key.
- You could imagine sharing that with a more granular Clear-Site-Data header in the future.
- In Chrome we'd want to surface non-standard/deprecated storage type usage (specifically, file system, websql, appcache), so the spec shouldn't specifically preclude that.
In Chrome we have this plumbed through internally for our DevTools implementation:
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels