使用 HTML5 本地 Web 存储文件
我对 Google Gears 及其在在线游戏开发(尤其是大型在线游戏开发)中的潜在用途非常着迷。人们可以使用 ResourceStore 获取游戏资源并将其存储在本地,因此减少游戏加载时间、服务器带宽问题等。因此,我对 HTML5 支持离线存储的消息表示欢迎。
但是,据我所知,它仅支持用于资源缓存的清单文件,看起来像是 ManagedResourceStore 应该提供的功能。我也没仔细研究过。
我也没有找到允许以编程方式加载资源并缓存它们的东西(显然 ResourceStore 允许)。
是否可以以编程方式控制应缓存哪些资源?或者我是否必须将每个“地图”存储在具有单独清单文件的单独页面上(这实际上是通过服务器端脚本完成的,而不是字面上创建页面和清单 - 这仍然很麻烦)?
I was fascinated by Google Gears and its potential use in online game development, particularly massive online game development. One could take the game resources and store them locally using ResourceStore, thus reducing game load time, server bandwidth issues, etc. I have therefore welcomed the news that HTML5 supports offline storage.
However, from what I can tell it only supports a manifest file for resource caching, which looks like something ManagedResourceStore is supposed to offer. I didn't study either in detail.
I also didn't find something that would allow programatically loading resources and caching them (as apparently ResourceStore allows).
Is it possible to programatically control which resources should be cached? Or would I have to store each "map" on a separate page with separate manifest file (with this being in fact done through a server side script, instead of literally creating pages and manifests -- this is still fugly)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您询问有关设计工作的信息,那么您似乎正在寻找 可编程 HTTP 缓存和服务。如果你真的想知道主流浏览器中是否有类似的东西,那么我不知道,但对此表示怀疑。
If you're asking about design work, it seems like you're looking for Programmable HTTP Caching and Serving. If you actually wanted to know if there's something like this in shipping browsers, then I don't know, but doubt it.