JavaScript todoist.com 新版,可以离线使用,再次连线会自动同步数据。请问这种同步如何实现

cqpx · 2012年07月26日 · 最后由 lainuo 回复于 2012年07月26日 · 3531 次阅读

http://todoist.com/html5

Offline access
With HTML5, Todoist offers full access to your tasks and task management whether you’re online or offline. When you can’t connect to the Internet, Todoist automatically switches to offline mode, enabling you to access and update your projects and tasks. Next time you connect to the web, the remote servers are automatically updated.

其实我之前也把我的书签站的数据存在 localstorage 里面,速度确实得到了大幅度的提升。 但是就是不知道 offline/online 切换以及同步的功能应该怎么去做,只能用本地数据冲掉服务器或者用服务器数据冲掉本地数据。

不知道各位有没有这方面经验?

匿名 #1 2012年07月26日

比较早之前,了解过,google gears 可以做这个。

最近想在自己的玩具里加 PouchDB 试试。

不过这玩意太局限了,只能和 CouchDB 一起玩。

同步最麻烦的应该是两边数据的合并,可能给每份加个版本号处理会方便些?

需要 登录 后方可回复, 如果你还没有账号请 注册新账号