AngularFIre Firebase saving data locally?

3921 views firebase

I have an app that displays a list of items. Here is what I am doing.

  1. When the app first loads I am making an HTTP request to get the list from the firebase database.
  2. once the list is received the list is stored locally on localStorage for future use.
  3. On future app loads, the list is loaded from localStorage to prevent unnecessary http calls

I am doing the above programmatically, i.e, saving data to localStorage and check for new data and getting it etc.

Does firebase provide any other way to the same?

answered question

1 Answer


There is no built-in support for cross page-reload persistence in the JavaScript SDK for the Firebase Realtime Database. Somebody is working on such functionality in the open-source repository, but no release was made with it yet.

If you need this functionality, I highly recommend looking into using Cloud Firestore. In addition to many other benefits, it supports cross page-reload persistence.

posted this

Have an answer?


Please login first before posting an answer.