本文介绍了HTML 5 Appcache 可以在 safari/opera/chrome 中运行,但不能在 firefox 中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网站上运行了一个 html5 应用缓存,它在 Safari、Opera 和 Chrome 中运行良好,但在 Firefox 上无法运行.

I have an html5 appcache running on a website, it works fine in Safari, Opera and Chrome but it fails to work on Firefox.

我的代码中有以下内容:

I have the following in my code:

<!DOCTYPE HTML>
<html manifest="./manifest.appcache">
<head>

以及以下 manifest.appcache 文件:

and the following manifest.appcache file:

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/ 调试应用缓存并在网站上显示输出.

I am using the code from here: http://jonathanstark.com/blog/2009/09/27/debugging-html-5-offline-application-cache/ to debug the appcache and display the output on the site.

在 firefox 中,调试代码的输出显示它正在下载所有文件并调用交换缓存.如果我随后断开 Internet 连接并单击指向本应下载的另一个页面的链接,我会在 Firefox 中收到无法连接消息,而在 Safari、Opera 和 Chrome 中执行相同操作时,它可以正常工作.

In firefox the output from the debug code shows it downloading all the files and calling swap cache. If I then disconnect from the internet and click on a link to another page which should have downloaded I get the Unable to Connect message in Firefox, while doing the same in Safari, Opera and Chrome it works fine.

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

Any help and suggestions would be appreciated.

谢谢史蒂夫

推荐答案

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

Look if the Server sets no-cache/no-store headers for the generated files. Firefox will then ignore the manifest in contrary to the other browsers.

这篇关于HTML 5 Appcache 可以在 safari/opera/chrome 中运行,但不能在 firefox 中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-04 14:10