Skip to content

Proposal: Add detailed usage breakdown in estimate() #63

Open
@inexorabletash

Description

@inexorabletash

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:

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:

image

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions