Ionic storage ? Cache ? Firebase?


I explain my problem, I have an application, which loads data with firebase (example: a pseudo, a profile picture etc.) However, when I leave the app and I go back it always reloads all data coming from firebase. That’s why I’m looking for a system allowing me to keep the previously loaded data and that it recharges either when it changes, or by reloading the page with a (Ion-refresher) of what I understood either we get on the page with the information already loaded last time and the news loads over … I do not know the existing systems I can not … I looked at ionic-storage side and this uses URLs. I do not understand at all because I use no URL … I’m lost and I can not finish my application because of that … please help me if you know a trick …

Thank you

The new Firestore database from Firebase has offline support built in, so your data is stored on the device. If you want to use the Realtime Database you can use angularfire2-offline.

1 Like

Thanks for answer, I try this :slight_smile:

I tried but I can not do it … I use the realtime database and the example with angularfire does not work … Personally, I use providers called in the ionViewDidLoad like for example: (
this.userProvider.getCurrentVariablesUser (). on (‘value’, userVariablesShot => {
this.userVariables = userVariablesShot.val ();
I do not know if it comes from the but in any case I have this error that is displayed … I do not know at all how to do … (In the database of firebase I added info and item with a name I do not know if that’s what to do to do as in the example …)

Thank you for helping me…

Maybe some code to show?