LocalStorage not working in iphone (ionic app)

I have a problem with localStorage on an ionic app on iphone. on android seems to be working fine. on iphone localstorage expires after a while. I tried with $localStorage.test

using angular ngStorage.js. and c: window.localStorage.test

same results. has anyone experienced this? any solution? Thank you. Rafi.

+3


source to share


1 answer


If the iPhone has little internal storage, iOS will automatically delete some caches and localstorage.

LocalStorage works well if the device has enough memory (usually more than 20 MB)



So it's better to use sqlite instead of localstorage :)

0


source







All Articles