首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >HTML5AppCache可以在safari/opera/chrome中工作,但不能在firefox中工作

HTML5AppCache可以在safari/opera/chrome中工作,但不能在firefox中工作
EN

Stack Overflow用户
提问于 2011-09-16 18:24:36
回答 7查看 5.5K关注 0票数 11

我有一个在网站上运行的html5应用缓存,它在Safari,Opera和Chrome上运行良好,但在Firefox上运行失败。

我的代码中包含以下内容:

代码语言:javascript
复制
<!DOCTYPE HTML>
<html manifest="./manifest.appcache">
<head>

和以下manifest.appcache文件:

代码语言:javascript
复制
CACHE MANIFEST
/
/accessibility
/anchoring
/areas-of-application-in-business
/calibrating-rep-system-preferences
/circle-of-excellence
/collapse-anchors
/contrastive-analysis-and-mapping-across
/convincers
/creating-an-air-of-authority
/decision-making
/elicitation-of-submodalities
/embedded-commands
/embedded-commands-2
/eye-patterns
/four-types-of-feedback
/home
/how-to-remember-names
/introduction-to-anchoring
/introduction-to-nlp
/key-elements-of-the-meta-model
/language-and-communication-model
/language-patterns
/leadership
/modelling
/my-action-plan
/new-behaviour-generator
/nlp-presuppositions
/outcome-thinking
/pacing-and-leading
/perceptual-positions
/predicate-phrases
/predicates
/preference-test
/presupposition-cards
/presuppositions
/privacy
/rapport
/rapport-pacing-and-leading
/representational-systems
/sensory-acuity
/strategies
/structure-for-adjusting-feedback
/structure-of-nlp-techniques
/structure-vs-content
/submodalities
/submodalities-and-strategies
/submodalities-checklist
/terms-and-conditions
/the-6-deadly-words
/the-meta-mirror
/the-power-of-presuppositions
/the-problem-frame-and-the-outcome-frame
/user-profile
/well-formed-outcomes
/what-is-nlp
/userImages/nlp_language_comm.png
/css/mobile.css
/css/style.css


# Hash: a4e8f4f6a4dd45dd3e8acdaae8546a0a

我使用这里的代码:http://jonathanstark.com/blog/2009/09/27/debugging-html-5-offline-application-cache/来调试appcache并在站点上显示输出。

在firefox中,调试代码的输出显示它正在下载所有文件并调用交换缓存。如果我断开与互联网的连接,并点击另一个本应下载的页面的链接,我会在Firefox中得到Unable to Connect消息,而在Safari,Opera和Chrome中也是如此,它工作得很好。

任何帮助和建议都将不胜感激。

谢谢史蒂夫

EN

回答 7

Stack Overflow用户

发布于 2012-07-24 22:21:05

查看服务器是否为生成的文件设置了no-cache/no-store头。与其他浏览器相反,Firefox将忽略该清单。

票数 11
EN

Stack Overflow用户

发布于 2014-03-15 06:16:27

我也遇到过类似的问题。问题是FireFox缓存文件更加激进,所以我必须添加这些头文件:

对于清单:

代码语言:javascript
复制
Pragma: no-cache
Cache-Control: no-cache
Expires: date

对于文件:

代码语言:javascript
复制
Last-Modified: date
Cache-Control: no-cache
Expires: date

date替换为RFC1123格式的当前日期。

票数 4
EN

Stack Overflow用户

发布于 2014-02-13 19:45:36

检查是否设置了no-cache/no-store头部

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7443311

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档