HTML5 ApplicationCache - 如何设置缓存页面的过期日期?

发布于 2024-12-15 07:13:14 字数 57 浏览 5 评论 0原文

我希望在特定日期删除缓存的页面。 怎么可能指定那个日期呢? 就我而言,我需要为每个页面动态设置日期。

I would like the cached pages to be deleted at a specific date.
How is it possible to specify that date?
In my case, I need the dates to be dynamically set for each page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

傾城如夢未必闌珊 2024-12-22 07:13:14

你不能。一旦页面位于客户端上,客户端就可以控制何时删除它们。如果您在特定日期更新清单文件并删除相关文件,那么当浏览器下次连接到您的站点并替换应用程序缓存时,将不会下载这些文件。

You can't. Once the pages are on the client, the client is in control of when they're deleted. If you update the manifest file at the specific dates, removing the relevant files, then when the browser next connects to your site and replaces the application cache those files will not be downloaded.

夜光 2024-12-22 07:13:14

如果我们从清单文件中删除该文件名,那么当用户下次上线时,该文件是否会从缓存中删除?

If we remove the file name from the manifest file, Will the file be removed from the cached if the user comes online next time?

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