Frustrating issues with Firefox and offline manifests

This post is more than 2 years old.

I'm working on a demo that makes use of the HTML5 offline manifest feature (nicely described here), and I'm having a hell of a time getting things to update in Firefox now that I've begun playing with things. I thought I had my demo ready to go. Whenever I changed my code I went into the cache manifest file and modified my header so that the server would see that the file was updated. This didn't always work, so I'd also go into Firefox settings (Tools/Options/Offline storage)and run Clear Now.

So in theory - that should tell Firefox that the next time I fetch my site it should rerun my cache manifest and update it's offline cache.

But here is where things are getting me. My final bit of code was failing because a file, find.html, was being sent from the cache, and not being updated, even though I had changed the file.

I updated my manifest file but that didn't work.

I then requested find.html directly in my browser - and even that didn't work.

I cleared cache, restarted Firefox, Apache, cleared cache again, and then this is where I noticed something odd. find.html has no mention of a cache manifest. At all. But when I request find.html in my browser, Apache loads a HTTP request was for my manifest file. So Firefox "knows" the file used to be in the cache and is asking for the manifest even though my HTML in find.html clearly does not tell it to load.

If I add ?x=1 to the URL, it works. But obviously I need a better solution.

So does anyone have any clues as to what this could be? To be clear, ./find.html is in the manifest, but if I make a direct HTTP request for find.html then why would my manifest be requested instead?

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Raymond Camden posted on 3/11/2011 at 11:00 AM

Ok - so I'm hitting the sack now. I seem to have gotten things to work by manually renaming my manifest file. It's like Firefox decided it was smarter than I was and load my manifest even when I bypassed it.

I must be doing something wrong. I mean, at some point, Firefox must let me refetch an HTML page.

Comment 2 by Cyril Hanquez posted on 3/11/2011 at 1:42 PM

Can you check the HTTP headers and see if there's no Cache-Control headers?

And instead of adding ?x=1 why not include in your manifest file a comment with a version number like # v. 0.1 ?

Comment 3 by Cyril Hanquez posted on 3/11/2011 at 1:48 PM

Oh and it seems that FireFox 3.6 is buggy and the only workaropund is to tell your webserver to tell the browser not to cache the file. With Apache, add

<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType text/cache-manifest "access plus 0 seconds"

Comment 4 by Raymond Camden posted on 3/11/2011 at 4:53 PM

I have been trying version headers but it's not working. I also tried an expiresactive - but a bit different then that. Will try that one.

Comment 5 by Raymond Camden posted on 3/11/2011 at 4:55 PM

Nope, no go. I modified find.html, modified my manifest, reloaded Firefox, and FF didn't see the manifest as being new.

Comment 6 by Raymond Camden posted on 3/11/2011 at 5:14 PM

This seems to be helping:

Comment 7 by Cyril Hanquez posted on 3/11/2011 at 5:18 PM

Do you mean that you had an error in your cache manifest?

Comment 8 by Raymond Camden posted on 3/11/2011 at 5:29 PM

No, but I could see when FF loaded new crap at least.

So now my problem is this. From what I thought I knew, if a request was NOT listed in the manifest, it should work online, but not offline.

I'm not seeing this. I have to use NETWORK: to add the stuff I want. But - * is not working. In Chrome this is especially evident. I load up a Google Map and it never loads. NETWORL: * doesn't do squat. This _kinda_ works:


But the issue is that Google Maps loads another JS file (one not explictely loaded in my code) and that isn't loaded since it isn't in network.

Comment 9 by Maertsch posted on 3/11/2011 at 6:28 PM

I'm also having big troubles with the manifest file. if content has changed, and navigator is online, the old files are loaded form cache. meanwhile in the background the cachemanifest is also updated (if something has changed in the file like a version number). On the next request the new files are showing up.

this means, just the second request shows the correct files.
i workaround it like this: check if cachemanifest is updateready, then swapcache and reload the site.
Its not great but works.

if you have NETWORK: * at the end of the file it should load the files if the navigator is online, the app will not load if its offline and these files (maps) are requestet.

i always cache the maps files, because they never change.

Comment 10 by Maertsch posted on 3/11/2011 at 6:37 PM

This comment should also be noticed:

Oh, and interesting thing in Firefox (possibly other browsers) - changing a commented out line in the manifest (an approach Apple's developer documentation recommends) DOESN'T cause it to trigger an cache update. You must to add or remove a line with an active instruction (e.g. actually add or remove an entry for a file from the cache manifest) before it will recognise the manifest has updated. – Iain Collins Jun 14 '10 at 10:40

Comment 11 by Raymond Camden posted on 3/11/2011 at 7:23 PM

@Maertsch: I seem to be having some luck with a combo of


in a tab as well as changing a comment line in the manifest


reloading twice.

Royal. Pain.

And still - FF seems.... "off". I've got a question open on StackOverflow and will continue to report.

In Chrome, things now seem perfect, unfortunately, chrome does not have a simple way to mimic offline.

Comment 12 by Ryan McIlmoyl posted on 3/11/2011 at 8:18 PM

From the Mozilla developer site in regards to manually clearing the application cache...

The offline cache is not cleared via Tools -> Clear Recent History (bug 538595)
The offline cache is not cleared via Tools -> Options -> Advanced -> Network -> Offline data -> Clear Now (bug 538588).
The offline cache can be cleared for each site separately using the "Remove..." button in Tools -> Options -> Advanced -> Network -> Offline data.

Comment 13 by Raymond Camden posted on 3/11/2011 at 8:21 PM

Yeah, but that worked one time for me. I saw localhost in the list. I removed it. Later testing showed that it never came back. I still used "Clear Now", but my website never showed up.

Comment 14 by Raymond Camden posted on 3/11/2011 at 8:22 PM

Btw - as a side note - while FF is being bitchy - I did a quick test of my demo on my Android phone... and it worked! So along with being frustrated, I'm super excited too. Any iPhone user here want to give it a quick test for me ? If so- hit my contact form instead of using a comment.

Comment 15 by David Vaccaro posted on 3/11/2011 at 8:29 PM

I'm sure you saw this but just in case:
So here’s one thing you should absolutely do: reconfigure your web server so that your cache manifest file is not cacheable by HTTP semantics. If you’re running an Apache-based web server, these two lines in your .htaccess file will do the trick:

ExpiresActive On
ExpiresDefault "access"

Comment 16 by Raymond Camden posted on 3/11/2011 at 8:55 PM

So I take it back. I hate HTML5. It worked - then I broke it. Firefox reports an error -b ut refuses to say WHAT is wrong.


David - whats the IIS version for that?

Comment 17 by Raymond Camden posted on 3/11/2011 at 9:01 PM

Nice - Chrome told me the actual error. IIS didn't have the mime type.

Comment 18 by Raymond Camden posted on 3/11/2011 at 9:11 PM

Ugh. I don't know what to even think now. Chrome says the manifest is good. In my testing on my Android it worked once. Then the second time it gave me a warning. I could bypass the warning, but then my code which checks for offline/online was ignored. If folks want to see what I'm doing, be my guest, but at thispoint I'm considering giving up.

Comment 19 by David Vaccaro posted on 3/11/2011 at 9:31 PM

I noticed that when hitting your demo I got a warning on a PC running safari but no warning on the mac running safari.

Ray, I'm not sure but I think IIS would read the same.

Comment 20 by David Vaccaro posted on 3/11/2011 at 9:32 PM

in web.config of course.

Comment 21 by Lola LB posted on 3/12/2011 at 3:57 PM

Ray . . . that's a bad link - two compounded URLs.

Comment 22 by Raymond Camden posted on 3/12/2011 at 6:48 PM

BlogCFC got confused. Just copy the URL by hand.

Comment 23 by Mick posted on 3/14/2011 at 6:08 PM

Useful post! I've exactly the same problem. Firefox doesn't update the cached manifest file...
I think this tips could resolve my problem ;-)
Thank you!