Intent to Ship: Durable (persistent) storage

297 views
Skip to first unread message

Dru Knox

unread,
Oct 4, 2016, 7:38:32 PM10/4/16
to blink-dev, dmu...@chromium.org, Joshua Bell

Contact emails

dk...@chromium.org, dmu...@chromium.org, jsb...@chromium.org


Spec

Storage spec.


Tag review


Summary

Sites can request storage persistence, which prevents browsers from automatically clearing web storage. Clear browsing data and storage management will still clear the storage.


Chrome will automatically grant the persistence permission if:

- The site is bookmarked (and the user has 5 or less bookmarks)

- The site has high site engagement

- The site has been added to home screen

- The site has push notifications enabled


Automatically denies in all other cases.


Link to “Intent to Implement” blink-dev discussion

Intent to Experiment - We have updated the granting heuristic based on developer feedback.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Demo link

https://permission.site/


Interoperability and Compatibility Risk

Low interop risk - Mozilla plans on shipping the API after UI reviews. Microsoft has shown generally positive signals.


No compat risk.


OWP launch tracking bug

crbug.com/502373


Entry on the feature dashboard

https://www.chromestatus.com/feature/4931497563783168


Chris Harrelson

unread,
Oct 4, 2016, 8:37:14 PM10/4/16
to Dru Knox, blink-dev, dmu...@chromium.org, Joshua Bell
LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Kenneth Rohde Christiansen

unread,
Oct 5, 2016, 3:02:50 AM10/5/16
to Chris Harrelson, Dru Knox, blink-dev, dmu...@chromium.org, Joshua Bell
I would like, say a flight boarding card site to have durable storage to make sure my boarding card doesn't disappear, but my regular engagement with the site will be quite low (no high engagement). Does that mean that the site will never be able to get durable storage?

Kenneth

LGTM1

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Anne van Kesteren

unread,
Oct 5, 2016, 5:14:02 AM10/5/16
to Dru Knox, blink-dev, dmu...@chromium.org, Joshua Bell
On Wed, Oct 5, 2016 at 1:38 AM, Dru Knox <dk...@chromium.org> wrote:
> Chrome will automatically grant the persistence permission if:
>
> - The site is bookmarked (and the user has 5 or less bookmarks)
> - The site has high site engagement
> - The site has been added to home screen
> - The site has push notifications enabled

I take it this is OR, not AND? Seems somewhat self-evident, but just in case.


--
https://annevankesteren.nl/

Philip Jägenstedt

unread,
Oct 5, 2016, 5:28:41 AM10/5/16
to Anne van Kesteren, Dru Knox, blink-dev, dmu...@chromium.org, Joshua Bell
There's a red TODO in https://storage.spec.whatwg.org/#persistence about the Permissions API, but it's actually in https://w3c.github.io/permissions/#persistent-storage?

Is navigator.permissions.query({name: "persistent-storage"}) hooked up in the current implementation?

Anne van Kesteren

unread,
Oct 5, 2016, 5:38:01 AM10/5/16
to Philip Jägenstedt, Dru Knox, blink-dev, dmu...@chromium.org, Joshua Bell
On Wed, Oct 5, 2016 at 11:28 AM, Philip Jägenstedt <foo...@chromium.org> wrote:
> There's a red TODO in https://storage.spec.whatwg.org/#persistence about the
> Permissions API, but it's actually in
> https://w3c.github.io/permissions/#persistent-storage?

See https://github.com/whatwg/storage/pull/36 for details on that.


--
https://annevankesteren.nl/

Harald Alvestrand

unread,
Oct 5, 2016, 5:41:59 AM10/5/16
to Anne van Kesteren, Philip Jägenstedt, Dru Knox, blink-dev, dmu...@chromium.org, Joshua Bell
The limit of "user has 5 bookmarks" seems strange.

Does this mean that I, who have ~100 bookmarks, will see different behavior on a bookmarked site from my daughter, who has none?


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.


Daniel Murphy

unread,
Oct 5, 2016, 3:21:52 PM10/5/16
to Harald Alvestrand, Anne van Kesteren, Philip Jägenstedt, Dru Knox, blink-dev, Joshua Bell
More info for granting:

We will use the important sites feature here:

Regarding bookmarks, if the user has 5 or less bookmarks, then those are considered important and can be granted durable. If they have more, we filter and sort bookmarks using site engagement, where site engagement need to be > 0 (so low is fine). We take the top 5 of these.

Daniel


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Anne van Kesteren

unread,
Oct 6, 2016, 4:06:48 AM10/6/16
to Daniel Murphy, Harald Alvestrand, Philip Jägenstedt, Dru Knox, blink-dev, Joshua Bell
On Wed, Oct 5, 2016 at 9:21 PM, Daniel Murphy <dmu...@chromium.org> wrote:
> Regarding bookmarks, if the user has 5 or less bookmarks, then those are
> considered important and can be granted durable. If they have more, we
> filter and sort bookmarks using site engagement, where site engagement need
> to be > 0 (so low is fine). We take the top 5 of these.

What if you exit the top 5? (Seems very bad if a site can think it's
persistent but then later gets dropped unknowingly.)


--
https://annevankesteren.nl/

Daniel Murphy

unread,
Oct 6, 2016, 4:09:52 AM10/6/16
to Anne van Kesteren, Dru Knox, Harald Alvestrand, Joshua Bell, Philip Jägenstedt, blink-dev
The permission doesn't get revoked unless the user clears the data for that site - or for all sites. The durable permission also is used to consider a site 'important', so it will show up as an option for exclusion when clearing all browsing data - currently under experiment and is a separate feature.

Dru Knox

unread,
Oct 6, 2016, 2:23:05 PM10/6/16
to Daniel Murphy, Anne van Kesteren, Harald Alvestrand, Joshua Bell, Philip Jägenstedt, blink-dev
Thanks for all the questions everyone! 

Regarding bookmarks - looking at usage numbers, there is a very sharp cutoff at 5 bookmarks. After this point, usage looks more like a long tail of unmaintained/crufty bookmarks that are left over time. Under 5, usage looks more like an actively maintained set of important sites with enough signal to grant persistence. 

If you have a lot of bookmarks, this just means it can no longer serve as a signal *on its own* and you need to have recent engagement with the site as well. This combined case should cover the boarding pass situation.

As Daniel mentioned, a site won't lose its persistence unless a user clears browsing data for the site. At which point all data is gone anyways.

@Anne - yes the list is an OR :)

Rick Byers

unread,
Oct 6, 2016, 3:00:47 PM10/6/16
to Dru Knox, blink-dev, Daniel Murphy, Joshua Bell
On Tue, Oct 4, 2016 at 7:38 PM, Dru Knox <dk...@chromium.org> wrote:

Contact emails

dk...@chromium.org, dmu...@chromium.org, jsb...@chromium.org


Spec

Storage spec.


Tag review


Summary

Sites can request storage persistence, which prevents browsers from automatically clearing web storage. Clear browsing data and storage management will still clear the storage.


Chrome will automatically grant the persistence permission if:

- The site is bookmarked (and the user has 5 or less bookmarks)

- The site has high site engagement

- The site has been added to home screen

- The site has push notifications enabled


Automatically denies in all other cases.


Link to “Intent to Implement” blink-dev discussion

Intent to Experiment - We have updated the granting heuristic based on developer feedback.


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Demo link

https://permission.site/


Interoperability and Compatibility Risk

Low interop risk - Mozilla plans on shipping the API after UI reviews. Microsoft has shown generally positive signals.


Anything public you can link to from Microsoft?  I don't see an entry on their dashboard.  Things listed as "under consideration" with priority >= medium (and "under development" of course) are pretty strong public signals of support from them.

Also a link to the Gecko bug would help as evidence of public support.

Dru Knox

unread,
Oct 6, 2016, 3:09:55 PM10/6/16
to Rick Byers, blink-dev, Daniel Murphy, Joshua Bell
Link to Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1298329

The spec is a WHATWG proposal so Microsoft is unable to comment. We have had active discussions with the Microsoft storage team about moving their quota system generally to a model that more closely aligns with Firefox and Chrome, since their current behavior is more complex. This is what I was referencing as positive signals.

Rick Byers

unread,
Oct 6, 2016, 5:43:36 PM10/6/16
to Dru Knox, blink-dev, Daniel Murphy, Joshua Bell
On Thu, Oct 6, 2016 at 3:09 PM, Dru Knox <dk...@chromium.org> wrote:

Great, thanks! 

The spec is a WHATWG proposal so Microsoft is unable to comment. We have had active discussions with the Microsoft storage team about moving their quota system generally to a model that more closely aligns with Firefox and Chrome, since their current behavior is more complex. This is what I was referencing as positive signals.

Ah yeah, that's the problem with working in WHATWG :-(.  So this basically counts as "no public signals" (though knowing there has been some good discussion in private is still nice).

Anyway LGTM2

Dimitri

unread,
Oct 6, 2016, 6:15:28 PM10/6/16
to blink-dev, dk...@chromium.org, dmu...@chromium.org, jsb...@chromium.org
LGTM4.

Chris Harrelson

unread,
Oct 6, 2016, 6:17:04 PM10/6/16
to Dimitri, blink-dev, Dru Knox, Daniel Murphy, Joshua Bell
Are LGTMs counts computed mod 4? :)

On Thu, Oct 6, 2016 at 3:15 PM, Dimitri <dgla...@chromium.org> wrote:
LGTM4.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Dimitri Glazkov

unread,
Oct 6, 2016, 6:18:01 PM10/6/16
to Chris Harrelson, blink-dev, Dru Knox, Daniel Murphy, Joshua Bell
It's Thursday, so yes :D

:DG<

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Nolan Lawson

unread,
Oct 13, 2016, 10:02:34 PM10/13/16
to blink-dev, dmu...@chromium.org, jsb...@chromium.org
I take it the assumption is that, if a site starts to show "app-like" characteristics (added to homescreen, showing push notifications), then the user will assume it can store persistent data? That seems like a safe bet, since it matches users' expectations with native apps. It could also align well with Windows' plans for PWAs, which as currently envisioned will probably share a lot of similarities with WWAs (if not be outright WWAs), i.e. they'll get as much storage as Windows native apps have.

I'll be curious to see how Chrome might change the settings UI, since allowing persistent storage means that users have more responsibility to go in and manage site data. Seeing "Chrome is taking up a bazillion MB" on their list of installed Android apps could be quite the sticker shock if they can't dig in and manage individual sites.

– Nolan

Daniel Murphy

unread,
Oct 14, 2016, 4:33:37 PM10/14/16
to Nolan Lawson, blink-dev, jsb...@chromium.org
Yes, having more robust storage management for the user is definitely desirable for PWA's. We have small movement here w/ the Manage Storage screen on Android (accessible from System Settings), and we definitely want to do more.

danielher...@gmail.com

unread,
Oct 22, 2016, 10:13:09 PM10/22/16
to blink-dev, dmu...@chromium.org, jsb...@chromium.org
Does added to home screen include added to shelf on desktop?
Reply all
Reply to author
Forward
0 new messages