HTML5 appcache:NETWORK:部分的真正用途是什么?
我找不到任何人不想将其所有 URL 放入 NETWORK: 部分的情况:
NETWORK: *
如果资源不在 CACHE: 部分中,也不在 NETWORK: 部分中,则不会加载该资源。但是如果资源不在 CACHE: 中而是在 NETWORK: 部分中,那么至少在用户在线的情况下会加载它!
I can't find any case where someone doesn't want to put all their URLs in the NETWORK: section:
NETWORK:
*
If a resource isn't in the CACHE: section, nor in the NETWORK: section, the resource won't be loaded. But if a resource is not in CACHE: but is in the NETWORK: section, at least it will be loaded in the case the user is online!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
NETWORK
部分允许您仅将您信任的资源列入白名单。这是一种安全措施。因此,它对于纯在线应用程序也很有用,即不使用其他两个部分(CACHE
、FALLBACK
)的应用程序。引自 MDN(截至 2012 年 10 月 28 日中欧夏令时间,我强调):
The
NETWORK
section allows you to white list only resources that you trust. It is a security measure. As such it is useful also for pure online apps, i.e. apps that do not make use the other two sections (CACHE
,FALLBACK
).Quote from MDN (as of 2012-10-28 CEST, with emphasis by me):
是的,你是对的。以下是我找到的完美答案:-
Yes, you are correct. Below is the perfect answer i found:-