Does the sync storage (``) serve as local storage for users who disabled syncing

When I store settings using, will this create a persistent storage for users who don’t use syncing? Or should I use storage.local in that case?

And when the sync storage could serve as a local storage I’m wondering what the purpose of the local storage is then.

Sync storage is just a normal storage that’s synced to other devices once in a while.
So if you are offline or without Firefox Account, it will behave just like a normal “storage.local”.

Unlike normal storage, this one has HUGE limitations in terms of capacity (100KB), single item size (8KB), number of items (512), number of changes per minute and others…

See the docs for Firefox and Chrome.

1 Like

Oh, so when I only use it for a bunch of settings* then I can simply use the sync storage and ignore the local one? Nice!

*) won’t exceed quota or single item size or number of items for sure

I think using it for settings is its main use-case of this storage, why it was built.

The only issue can be if some users wants to use a different settings on different computers, like “dark theme” at home but “light theme” at work. So some settings may be better to save locally.

1 Like