Persistence solution for mobile Phonegap / HTML5 App Persistence solution for mobile Phonegap / HTML5 App json json

Persistence solution for mobile Phonegap / HTML5 App


You could simply use HTML5 Storage / SQL Lite for this. Take a look at: http://diveintohtml5.ep.io/storage.html

I`ve been using Localstorage on iOs and Android without any problems, and since localstorage is backed up by sqllite i think you should be fine. (but i canĀ“t say anything for sure for sqllite on android)


HTML5 storage works fine on Android. A nice tool to make reading and writing to the database easier is persistenceJS.

I've just started on setting up the iPhone version of my jQueryMobile / Phonegap app. It stalls right at the point where the first call to localdb is made. This may be a problem of the iOS simulator, since the regular Safari runs my app just fine from the browser.


The HTML5 LocalStorage option will works fine until iOS 5.0. But there might be some problems from iOS 5.1 and later.

So my suggestion is to write some javascript code to back up to the document folder via fileAPI, and reconstruct the WebSQL database periodically.