User local storage vanished when new version of extension published

85 views
Skip to first unread message

Giga Spoke

unread,
Oct 2, 2021, 9:58:43 PM10/2/21
to Chromium Extensions
Hi all, we found that user local storage is vanishing when new version of our extension was published and the user got it automatically since they have turned on "Sync". What is the recommended way to solve this issue. we want to persist the user's local storage indefinitely. Does the chrome storage behave the same way. Is there any setting user or we can use to prevent the local storage from being wiped out when new extension version is published?
Thx all. 

Carlos

unread,
Oct 3, 2021, 6:25:25 AM10/3/21
to Chromium Extensions, Giga Spoke
Are you talking about window.localStorage? In that case, I suggest using the extension storage API instead, since window.localStorage will stop working in some browsers in the future for webExtensions.

Op zondag 3 oktober 2021 om 03:58:43 UTC+2 schreef Giga Spoke:

Giga Spoke

unread,
Oct 3, 2021, 10:02:29 PM10/3/21
to Carlos, Chromium Extensions
Hi so if I use chrome.storage - Chrome Developers API will it persist and will the data continue to be available to my extension even when I publish a new version of my extension ..?

This must be a widely used feature and widely encountered issue so I look forward to your answer.

Thx.

Carlos

unread,
Oct 4, 2021, 5:07:24 AM10/4/21
to Chromium Extensions, Giga Spoke, Chromium Extensions, Carlos
Yes, pretty sure the storage won't be cleared upon new extension versions. Unless you use methods like clear or something of course.

Op maandag 4 oktober 2021 om 04:02:29 UTC+2 schreef Giga Spoke:
Reply all
Reply to author
Forward
0 new messages