问题
I'm building a mobile App using Ionic framework. My app heavily uses offline database. My first attempt was to use ngStorage which uses localStorage but after a while i hit the size quota limit which is about 5MB. So i took a look at angular-localForage , In there it says:
Store your data in the best available storage solution that your browser can offer (IndexedDB / WebSQL or localstorage as a fallback)
Now for my multi-platform Mobile App does it mean it's going to use IndexedDB which has a higher size limit in regards of storing data? Or will it use localStorage and i'm back to square one?
If it's IndexedDB, is there any documentation on how much actual data my Mobile App can store?
It would be splendid if localForage takes care of size limit because the way it stores the data is perfectly fit for my application but I'd like to know if someone has used localForage in their app without worrying about their database size hitting a limit.
I'm also open to any alternatives except relational sqlite because i want an object-oriented approach. (PouchDB as an example)
回答1:
Add this plugin to your app and use PouchDB. PouchDB will use the native sqlite storage, which can store upto 1 GB of data. You can read more about this here. under heading "SQLite plugin for Cordova/PhoneGap"
http://ngcordova.com/docs/plugins/sqlite/
来源:https://stackoverflow.com/questions/32406730/localforage-size-limit-for-an-ionic-mobile-app