11

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>

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

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.

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.

Thanks Steve

Steve Jones
  • 111
  • 1
  • 3
  • Sounds like your Firefox didn't go into offline mode, it probably thinks that you are still connected to the internet. Click Firefox button, check "Work Offline" in the "Web Developer" submenu to see whether that's the reason. – Wladimir Palant Sep 16 '11 at 11:08
  • I've just tried this and it displays the offline mode error page. – Steve Jones Sep 16 '11 at 11:54

7 Answers7

11

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.

Marvin Emil Brach
  • 3,984
  • 1
  • 32
  • 62
  • 1
    Yes this is the correct solution. I ran into the similar problem and this help solve my problem. – Nitesh Oct 04 '12 at 07:52
  • 1
    I also found this to be a resolution in Google App Engine, which was working fine in Chrome, but not in Firefox (the updateready event would just keep firing each time the page loaded). Overwriting the default app engine Cache-Control header with an empty string seems to have stopped this mis-behaviour. – notreadbyhumans Jan 27 '13 at 16:16
4

I had a similar problem. The problem was that FireFox cache file more aggressively, so I had to add these headers:

For the manifest:

Pragma: no-cache
Cache-Control: no-cache
Expires: date

And for the files:

Last-Modified: date
Cache-Control: no-cache
Expires: date

Replace date by the RFC 1123 formated current date.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
julienfr112
  • 2,077
  • 2
  • 25
  • 37
1

check if the no-cache/no-store headers are set

testing
  • 11
  • 1
1

I had a similar problem.

  1. Make sure the manifest file is served as type "text/cache-manifest"
  2. Dont try it out in Private Browsing mode in Firefox/IE. It only works in regular browsing mode. But it works in both modes in Chrome
  3. While offline, a simple change in the URL could be a problem

    • http://localhost:8080/app doesn't work on Firefox/IE
    • http://localhost:8080/app/ works on Firefox/IE

    Both of them work in Chrome

  4. Use these handy resource viewers to get more detailed perspective
    • about:cache - Firefox
    • chrome://appcache-internals/ - Chrome

Please fill in if someone knows what is it for IE.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user1429007
  • 308
  • 1
  • 3
  • 10
0

In Firefox Preferences -> Advanced -> Network, in the "The following websites have stored data for offline use:" list, do you see your website? If so, try clearing your website from the list and then reloading your website.

Earl Zedd
  • 1,101
  • 10
  • 11
  • It was displayed in the list so i cleared it and it still hasn't worked. Thanks for the suggestion. – Steve Jones Sep 19 '11 at 09:12
  • Can you post a link to the live site? Also, does cotangent.co (mine) cache for you in FF? If so, view source and copy the caching code into your site. Use an .htaccess file with just the following line "AddType text/cache-manifest appcache manifest" (without quotes, obviously). If that works, add items back into the manifest file one at a time until something breaks. – Earl Zedd Sep 21 '11 at 02:18
  • Hi metahack. I've looked at your site and it does work ok. The only thing I can think of is that my site (steve-j.co.uk) doesn't have a physical .html pages. It's dynamically generated using a cms. Maybe that's causing issues in FF but strange that it still works on other browsers. – Steve Jones Sep 21 '11 at 14:31
  • Looks like steve-j.co.uk contains some links to slideshow images that aren't in the manifest-- maybe Firefox javascript is attempting to run the slideshow and is hanging the page. Try removing the slideshow temporarily or doing a view source on your home page and making sure every link you see is in the manifest. What's your CMS? – Earl Zedd Sep 30 '11 at 05:43
-1

Earl's answer above worked for me in combination with turning FireBug off.

In Firefox Preferences -> Advanced -> Network, in the "The following websites have stored data for offline use:" list, do you see your website? If so, try clearing your website from the list and then reloading your website.

Sébastien
  • 11,860
  • 11
  • 58
  • 78
-1

I face the same problem too; this header is fix for me.

Content-Type: text/cache-manifest

liratanak
  • 97
  • 10