使用 HTML5 本地 Web 存储文件

发布于 2024-08-17 03:31:12 字数 740 浏览 4 评论 0原文

我对 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

2024-08-24 03:31:12

如果您询问有关设计工作的信息,那么您似乎正在寻找 可编程 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文