Bug 229811 - Implement Storage API
Summary: Implement Storage API
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 229925 229965 230053 230059 230675 248918
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-02 09:30 PDT by Sihui Liu
Modified: 2023-05-10 14:54 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2021-09-02 09:30:03 PDT
Spec: https://storage.spec.whatwg.org
Comment 1 Radar WebKit Bug Importer 2021-09-02 09:30:40 PDT
<rdar://problem/82678873>
Comment 2 Sam Sneddon [:gsnedders] 2022-10-28 05:00:44 PDT
AFAICT, the only thing left to do here is https://github.com/WebKit/WebKit/blob/a121340322ef72e3e303af58db1c88cb23bf397d/Source/WebCore/Modules/storage/StorageManager.idl#L36 :

// FIXME: add Promise<StorageEstimate> estimate();

That said, we don't appear to have any open bug for that?
Comment 3 Nate Brustein 2023-03-20 07:27:16 PDT
I'm not seeing StorageManager.persist() and persisted() work in the way I expect.

Here is what I'm seeing in Safari:

 * storage.persist() will resolve to true
 * In the same session, storage.persisted() will resolve to true
 * After refreshing the page storage.persisted() will resolve to false

I would expect that if storage.persisted() resolved to true in one session, it would still be true in a subsequent session. That's what I'm seeing in Chrome and FF.

Am I misunderstanding the behavior here, or is this unexpected?
Comment 4 Sihui Liu 2023-05-10 14:54:01 PDT
(In reply to Nate Brustein from comment #3)
> I'm not seeing StorageManager.persist() and persisted() work in the way I
> expect.
> 
> Here is what I'm seeing in Safari:
> 
>  * storage.persist() will resolve to true
>  * In the same session, storage.persisted() will resolve to true
>  * After refreshing the page storage.persisted() will resolve to false
> 
> I would expect that if storage.persisted() resolved to true in one session,
> it would still be true in a subsequent session. That's what I'm seeing in
> Chrome and FF.
> 
> Am I misunderstanding the behavior here, or is this unexpected?

Hi, the persisted flag was not persisted (as WebKit didn't evict data on storage pressure), and this particular issue is fixed at https://bugs.webkit.org/show_bug.cgi?id=256483.