0
votes

I want to use Phonegap on firefox os but I have a problem on storage api. Current cordova version 3.0, supports websql and localstorage API. It doesn't have indexedDB API yet. So, my current option is to use Lawnchair.

But do you have a good idea on how to design a persistence layer for this. What can you suggest?

Please let me know. Thank you.

2
What do you mean with 'design a persistance layer for this'? If you'd rephrase your question so that it would describe an actual problem you'd get more answers.Jan Jongboom

2 Answers

2
votes

You might try using localForage:

https://github.com/mozilla/localforage

To quote, "localForage is a handy library that improves the offline experience of your web app by using asynchronous storage (via IndexedDB where available) but with a simple, localStorage-like API."

1
votes

If your app is for Firefox OS only you can use the indexedDB API directly, it's already supported without plugins.

For other platforms, there is a cordova indexdb plugin being developed that might help, you can find it on github here. It uses indexedDBShim which could also be helpful.