[Web Storage] navigator.storage.persist constantly returns false

Impact for my app: high (it may explain data corruptions that some of our users are facing, and we can’t risk losing data)
Do you currently have a workaround? No. (as this is a browser flag dedicated for this purpose.)
As an app, we would like that our data will not be evicted.

data eviction is a process that chrome does whenever the computer is running low on storage.
as long as your data is not marked as persistent, chrome may delete your persistent web storage to clear up space.
Data Eviction may cause issues like data corruption or full local storage deletion.

in order to prevent data eviction, you are required to call :

navigator.storage.persist()

there’s also a parallel call to check if you are already persisted:

navigator.storage.persisted()

when calling persist, Overwolf will always return false:
image

in a regular browser environment, the exact same call will return true:
image

you can read more about:

1 Like

We will update this on our next CEF update release (1-2 iterations) and with that, we’ll also try to remove the storage limit (of 5MB).

Please provide the reference to “Data Eviction may cause issues like data corruption” - as we see, eviction should work on entire keys - not partial data of a key. (at least with localStorage, which is what you are using right now).

2 Likes

Awesome!
We’ll be waiting for your update.

when I referred to corruption, I meant that some of our localStorage keys are missing, not that the contents of the keys are corrupted.

furthermore, in most cases we’re experiencing a full data eviction (aka: all entires in localStorage are being fully wiped), rather then partial eviction / “corruption” (some keys are deleted, others don’t)

Are we still on track with this estimation?
(just trying to understand if things are going as planned)

@shir.brass Hi, it will be released in OW 0.164v.
I guess that it will take longer than 1-2 iterations. We are talking more like 3-4 iterations.

I will update the ticket once it is released.

Thanks.

1 Like

@eransharv I can confirm that this is no longer an issue.

it appears like after you integrate web storage like “indexeddb”, the persist & persisted flags unlock and become available all of a sudden

1 Like

@shir.brass, thanks for the update!

Closing.