Search code examples
ionic2local-storageionic3ionic-nativeionic-storage

Ionic 2+ how long is the information saved in local storage?


I have a simple database that saves words and I'm trying to do as little database requests as possible in my app. I thought I would simply call a get request at the app startup and store all the words into the Ionic local storage and then call them when needed.

I'm wondering how long the information stored in the local storage is being kept - does it clear when the user closes the app? Or does it clear when the phone is being restarted? Or is it kept till I clear it in my code?


Solution

  • When the user clears app data on android, all the data would go as well. Else it would remain till you call the storage's "clear" function.