How persistent is IndexedDB in a Chrome app

Developing a stand-alone Chrome application using IndexedDB as a repository and the following questions:

1. What is the way the user opened the console in my application and cleared indexedDB, is there any other way that I should worry that IndexedDB data is lost?

2. Since chrome applications are now ported to ios and android using a cord, can unlimited storage and FileSystem Apis work on these platforms? Therefore, I can use them to store indexed db and use the file system to keep indexeddb backed up.

+7
local-storage google-chrome-app persistent-storage indexeddb
source share
2 answers

Regarding IndexedDB :

  • There are size limits, if your application exceeds them, the data will be "lost". (I'm not sure that unlimitedStorage applies only to FS or also to IDB, but in any case, the drive has limitations).

  • Sync Chrome apps on devices, but not in IndexedDB repository. chrome.storage.sync does (but looks more like replacing localStorage than replacing IndexedDB ).

  • Now I can’t find information about this, but I remember hearing about an unusual error causing some applications (only when switching to a certain type of update) in order to potentially lose IndexedDB data. This is really not the norm, so I would not worry about it. But for completeness, this is another possible way to lose data.

Regarding Mobile App using Cordova filesSystems:

We support chrome.fileSystem (as well as the HTML5 file system), however IndexedDB not supported on iOS WebView or Android WebView until KitKat. There is a cordova plugin that you can install to make it work (and I used it myself), but I'm not sure how reliable / easy it would be to back up and restore the database itself (why do you want it?).

Edit: Chrome Apps for mobiles also support chrome.storage.local , but they don’t yet support synchronization.

+1
source share

If you request unlimitedStorage permission in the manifest file for a chrome application or extension, the storage space will be as large as the free space on your hard drive. In this case, the application will not exceed the size limit.

see chrome unlimited storage

0
source share

All Articles