Firebase可以100%脱机运行并稍后同步吗? [英] Can firebase run 100% offline and sync up later?

查看:69
本文介绍了Firebase可以100%脱机运行并稍后同步吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为任务工作构建一个应用程序,该应用程序可以100%脱机运行,然后在服务器重新连接到Internet时与服务器同步.该应用程序当前"在数据库中有超过6,000名人员,当传教士在野外时需要进行搜索.挑战在于,我需要本地的所有"数据并在多台笔记本电脑或平板电脑上断开连接.我知道我可以使用像CouchDB这样的数据库,但是我更喜欢使用firebase或类似的东西来简化系统的管理. Firebase 是否可能?

谢谢!

解决方案

Web客户端可以处理间歇性的脱机(将脱机工作,但将无法刷新页面),但不能像本机SDK那样持久地脱机. /p>

如果您的Web应用程序需要特定的脱机功能,请使用 ServiceWorker IndexedDB .您可以创建持久的离线数据缓存以实现功能.

Jake Archibald的离线食谱是构建离线Web应用程序的绝佳资源.

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!

解决方案

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.

这篇关于Firebase可以100%脱机运行并稍后同步吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆