Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Starred by 8 users
Status: Fixed
Closed: Jun 2
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: 61-Stable-Exp
Launch-Privacy: ----
Launch-Security: ----
Launch-Status: ----
Launch-Test: ----
Launch-UI: ----
Product-Review: ----

Blocked on:
issue 690720

Sign in to add a comment
Storage API: quota estimate() method
Project Member Reported by, Apr 15 2016 Back to list
(See for an overview)

Change description:
Add estimate() method to to retrieve quota.

Changes to API surface: - returns Promise, which yields {usage, quota}

Public standards discussion:

Support in other browsers:
Internet Explorer: no
Firefox: pending
Safari: no

Comment 1 by, May 3 2016
Any update on this?
It's in experimentally, i.e. run chrome with --enable-experimental-web-platform-features. Feedback appreciated!

Comment 3 by, May 4 2016
Thanks, is now available to page and (more importantly to me) SW - will do some experiments.
Comment 4 by, May 16 2016

I've done some experimenting and things work mostly as I had expected, thanks. I have three questions:
1. It seems a SW can't ask for a "box" to be persisted, is that correct according to the spec (I think so, want to verify)?
2. If the page asks to persist there is no prompt or anything - the UA just rejects. Should it be this way?
3. I've seen somewhere that you should be able to check the "persist state" by using navigator.permissions.query({name: "persistent-storage"}), but that does not seem to work. Have I got that part wrong?

Comment 5 by, May 16 2016
These questions are more for the "durable storage" part rather than the "quota" part - e.g. stuff covered in the launch process under  issue 502373  (for historical reasons we refer to the implementation of a "persistent storage permission" as "durable storage" in Chrome)

1. A SW should be able to call - if not, please file a bug!

2. Whether or not the UA shows UI is up to the UA. Chrome uses heuristics instead of a prompt. But it should resolve with "false" rather than rejecting if denied.

3. The navigator.permissions API is a bit in flux so we have no integrated the two yet. That's noted in the spec - "We will eventually integrate with the Permissions API... but since that specification is not in great shape at the moment that has not happened yet."

Comment 6 by, May 19 2016
Thanks for the response, I realised after hitting the "Save changes" button that my questions belonged elsewhere. I'll check again on 1. and file a bug if appropriate.
Comment 7 by, May 19 2016 => {console.log("persist succ");}).catch(() => {console.log("persist fail");});

works fine in the browser console, but outputs

Uncaught TypeError: is not a function(…)

in the SW console. 

Where should I file the bug?

(Sorry to still be a bit off topic for this particular bug)
Comment 8 Deleted
Comment 9 by, May 19 2016
Ah, sorry, no - persist() is not exposed in SW contexts, since some UAs may show a permission prompt and we (browser vendors) have not solved the "show a permission prompt from a SW" problem yet.

To be clear, my comment in c#5 was wrong, sorry!
Comment 11 by, May 20 2016
Np, when I read the spec ('[Exposed=Window] Promise<boolean> persist();') that is what I expected.
Blockedon: 690720
Mozilla is apparently targeting FF57:

Project Member Comment 14 by, May 26
The following revision refers to this bug:

commit ce390470c7c40222140f1897f7405bc475d2f1a7
Author: jsbell <>
Date: Fri May 26 16:46:01 2017

Enable in stable

Intent to Ship:

BUG= 603992 

Cr-Commit-Position: refs/heads/master@{#475032}


Labels: Launch-M-Target-61-Stable-Exp
Status: Fixed
Sign in to add a comment