htmlgoogle-chrome-extensionindexeddbgoogle-chrome-apppersistent-object-store

indexedDB in a Chrome App


I'm building a chrome app which requires a persistent and local database, which in this case can be either indexedDB or basic object storage. I have several questions before i begin developing the app:

  1. Is it possible to persist indexedDB data after un-installation of the chrome app and chrome browser?
  2. If the indexedDB file/data persist can i locate and view it?
  3. If I can locate but can't view it, is it possible to change the location of the indexedDB file?
  4. Can I store the indexedDB in a file located on desktop or any other custom location?

Solution

  • I am writing a basic browser only application. No back end server code at this time. So I also have storage requirements. But I am not doing backup. I am looking at pouchdb as a solution: http://pouchdb.com/

    Everything is looking good so far. They also mention that they would work well with Google Apps.

    http://pouchdb.com/faq.html#native_support

    The nice thing is you could sync your pouchdb data with a server couchdb instance.
    http://pouchdb.com/api.html#replication

    http://pouchdb.com/api.html#sync

    If you want to keep the application local to the browser with no server support you could backup the entire database by using a batch fetch.

    http://pouchdb.com/api.html#batch_fetch

    I would run the result through gzip before you put it on the filesystem.