I am developing an angularjs app. The app has to run in current FF, IE, Chrome and on iOS/Android via Phonegap.

I am looking for a solution to store data in the client.

Phonegap offers a web sql api, that is also supported by Chrome. FF however does not support it, since it is abbandoned by w3c.

Cookies and localStorage do not work reliable in iOS.

How can i store data in all those browsers?

Take a look at http://caniuse.com/#feat=namevalue-storage - it seems that name/value storage is supported by most of the browsers. But it also states "In iOS 5 & 6 localStorage data is stored in a location that may occasionally be cleared out by the OS."

So I guess you have to create a local-storage-wrapper for you application and find workaround for each required browser. Those workarounds are called polyfill and you might find some which already fit your needs. For example, take a look at this page: https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.