Search code examples
firebasefirebase-hosting

Can firebase run 100% offline and sync up later?


I need to build an application for mission work that runs 100% offline and then syncs up with the server when it reconnects to the internet. The application "currently" has over 6k people in the database that needs to be searchable when the missionaries are in the field. The challenge is that I need "all" of the data local and disconnected on multiple laptops or tablets. I know I can use a database like CouchDB but I would much prefer use firebase or something similar to keep the management of the system simple. Is this possible with Firebase?

Thanks!


Solution

  • The web client can handle intermittent offline (will work offline, but won't survive a page refresh), but not persistent offline like the native SDKs can.

    If your web app needs specific offline functionality, look into using ServiceWorker and IndexedDB. You can create a persistent offline cache of data for offlne functionality.

    Jake Archibald's Offline Cookbook is a great resource for building offline web apps.