[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:

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)