gpt4 book ai didi

iphone - webkit .appcache 文件缓存动态页面

转载 作者:太空宇宙 更新时间:2023-11-03 13:37:01 27 4
gpt4 key购买 nike

我的移动网络应用程序的主页是一个 .jsp 页面。我的应用程序需要登录(Google App Engine),因此当用户未登录时有一个登录按钮,当用户登录时有一个注销按钮,所有这些都由 .jsp 页面上的代码处理。

我在页面上加载了很多 JS 代码,所以我使用了一个 .appcache 文件来缓存它。不幸的是,即使我将我的 .jsp 页面添加到网络区域,该页面仍以一种有趣的方式被缓存,忽略了来自服务器的内容服务器。这意味着我的注销按钮会在用户注销时显示,反之亦然。

我尝试添加 no-cache 指令作为元标记,但它们都被忽略了。

想法?

最佳答案

根据 dive into HTML5,引用 list 的页面会自动包含在 list 中。

http://diveintohtml5.ep.io/offline.html

Q: Do I need to list my HTML pages in my cache manifest?

A: Yes and no. If your entire web application is contained in a single page, just make sure that page points to the cache manifest using the manifest attribute. When you navigate to an HTML page with a manifest attribute, the page itself is assumed to be part of the web application, so you don’t need to list it in the manifest file itself. However, if your web application spans multiple pages, you should list all of the HTML pages in the manifest file, otherwise the browser would not know that there are other HTML pages that need to be downloaded and cached.

我有一个类似的问题,我想我最终会通过 AJAX 加载页面的内容。

关于iphone - webkit .appcache 文件缓存动态页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5735177/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com