iOS - 如何在本地镜像 Web 目录? (喜欢 iCloud)
我正在尝试以一种方式镜像 Web 目录,如果文件被修改,它就会在本地进行修改。如果它被删除,它就会从我的 iPad 等中删除...... iCloud 的工作原理与此类似,但我无法使用 iCloud。 你知道 iOS 中是否有一个类可以用来实现这个目的吗?
这个想法是下载一次内容,然后每次进行更改时都会从服务器获取通知。
I'm trying to mirror a web directory in way that if a file is modified, it's gets modified locally. If it's removed, it gets removed from my iPad etc...
iCloud works like that but I can't use iCloud for that.
Do you know if there's a class in iOS I can use for that ?
The idea is to download the content once and then getting notification from the server every time a change is made.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要查明是否发生了修改,仅 HTML 标头请求会告诉您是否发生了更改 - 请参阅 有关更多信息,请参阅 HTTP etag 上的 wiki 条目。
AFAIK 必须对您可能感兴趣的每个资源(文件)发出此标头请求。
作为客户端开发人员,eTag 及其处理通常是透明发生的。 ASIHTTPRequest、AFNetworking 和 AFAIK 甚至 NSURLConnection 等框架在启用缓存时默认处理此属性 - 因此您无需自己处理/存储 eTag。
For finding out if a modification has taken place, a HTML header-only request would tell you if something has changed - see the wiki entry on the HTTP etag for more.
This header request would AFAIK have to be issued on each and every resource (file) you might be interested in.
The eTag and its handling usually is happening transparently for you as a client developer. Frameworks like ASIHTTPRequest, AFNetworking and AFAIK even NSURLConnection handle this property by default when enabling caching - hence there is no need for you to handle/store the eTag yourself.