navigator.storage.persist() doesn't work as expected, unless page is bookmarked

638 views
Skip to first unread message

Duy Dao

unread,
Sep 15, 2017, 11:38:07 AM9/15/17
to Chromium-discuss
Hi,

After reading a blog entry about persistent storage[1], I was under the impression that navigator.storage.persist() [2] should request the permission for persistance, so that the storage will not be cleared under pressure.

The method always returned false, unless I add the page to my bookmarks. This may work for progressive web apps, but AFAIK there is no way to add the web page to the bookmarks in the android web view (cordova app).

Is this the intended behaviour or rather a bug? 

I'm thankfull for any hints!

Regards,

Dave




domi...@chromium.org

unread,
Sep 17, 2017, 10:56:24 PM9/17/17
to Chromium-discuss
Persistent storage does not prompt the user in Chrome. Instead the browser uses latent metrics (is the page bookmarked, or does it have notifications permission granted for instance) to determine if the user is using the site sufficiently to allow storage to be persistent.

I am not fully aware of whether persistent storage is supported in WebViews

Torne (Richard Coles)

unread,
Sep 19, 2017, 9:30:20 AM9/19/17
to domi...@chromium.org, Chromium-discuss
I don't think we've done anything to make this work in WebView. We'd have to expose a callback to the embedding app to let it decide whether the site should be allowed to use persistent storage, and we don't have that right now.

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

Reply all
Reply to author
Forward
0 new messages