如何与 ruby​​ on Rails 应用程序进行在线/离线同步?

发布于 2024-12-13 22:33:49 字数 139 浏览 5 评论 0原文

有什么方法可以与 Rails 项目进行离线同步吗?

换句话说,我们的客户正在使用他们的网站来展示照片库,但他们需要能够在没有有效互联网连接的情况下做到这一点。他们可以随时恢复在线并下载任何新数据,以便能够继续展示他们的画廊?

谢谢!

Is there any way to do offline syncing with a rails project?

In other words, our client is using their site to show a photo gallery, but they need to be able to do it without an active internet connection. At any time, they can get back online - and download any new data - to be able to continue showing their gallery?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傾旎 2024-12-20 22:33:49

您必须创建一个 JavaScript 客户端应用程序,将更改和状态存储在 HTML5 本地存储中。因此,对于用户来说,他可以执行操作,这些操作可以稍后保存/同步到服务器(例如,当他再次连接到互联网时)。

Sproutcore 将是理想的选择。我不确定是否有任何即将推出的 javascript 库(Backbone.js、spine.js)与本地存储交互。

希望这有帮助。

You will have to make a javascript client application, that stores changes and state inside the HTML5 local storage. So for the user he can do actions, which can be saved/synced later to the server (e.g. when he is connected to the internet again).

Sproutcore would be ideal for this. I am not sure if any of the up and coming javascript libraries (Backbone.js, spine.js) interact with local storage.

Hope this helps.

浪漫之都 2024-12-20 22:33:49

我决定使用rack-offline,但没有人回答。

如果有人感兴趣,可以在 github 找到它。

I have decided to use rack-offline, but no one answered it.

It can be found at github if anyone is interested.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文