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

cqpx · July 26, 2012 · Last by lainuo replied at July 26, 2012 · 3533 hits

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 切换以及同步的功能应该怎么去做,只能用本地数据冲掉服务器或者用服务器数据冲掉本地数据。

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

Unknow user #1 July 26, 2012

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

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

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

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

You need to Sign in before reply, if you don't have an account, please Sign up first.