Take the 2-minute tour ×

Since Firefox is prompting the user to store data when using the HTML5 application cache, I want to disable it in Firefox to avoid the prompt notification.

One way to do that is serving two different HTML files: one for Firefox with <html> and one for the other browsers with <html manifest=...>.

But for efficiency purposes I want to serve one single static file.

So how do I disable the application cache while serving a file with <html manifest=...> in Firefox?

share|improve this question
There is a dom.storage.enabled setting in about:config that should do what you want. –  Marc B Aug 26 '11 at 18:52
@Marc: I don't think that he wants to disable it in his personal web browser. –  Wladimir Palant Aug 26 '11 at 18:56
"one single static file". Since that means the server can't mangle the file, that leaves changing browser settings. –  Marc B Aug 26 '11 at 18:58
@Marc B: I was speaking from a web developer perspective. Since your setting is a user setting and a global setting I won't be able to change it as a website –  brillout.com Aug 26 '11 at 19:00
Then you'd need to do something dynamic on the website. Some browser sniffing and serve up the cache-free version to any browser claiming to be Firefox. –  Marc B Aug 26 '11 at 19:03
show 1 more comment

2 Answers

up vote 4 down vote accepted

The manifest attribute isn't checked until the page is loaded. Meaning that you can remove it while the page is loading and the prompt won't appear. Like this:

<script type="text/javascript">
  if (window.navigator.product == "Gecko")

Which of course assumes that all Gecko browsers need to be banned for all eternity because of this prompt. Definitely not nice, particularly because the prompt might disappear at some point in future. But I don't see a proper way to detect whether a browser will prompt the user about storing the web application for offline use.

share|improve this answer
this works. thousand thanks. I was subconsciously falsely assuming that it would be checked before the loading of the page:). Yeah I would love to enable appCache for Firefox but to me the prompt is a no go which btw from my perspective is kind of a flaw of Firefox –  brillout.com Aug 26 '11 at 19:30
window.navigator.product is "Gecko" in Safari and Chrome too! Also the fact that this works seems to be an accident, against HTML5 spec, which says that "Application cache selection happens in the HTML parser." (w3.org/TR/html5/browsers.html#read-html) –  natevw Dec 31 '12 at 17:49
add comment

Use an iframe to install the applicationCache; that way you can prompt a user with a button, and load the iframe once they click on that button.

share|improve this answer
add comment

Your Answer


