I’ve been working on an HTML5-based offline web application but ran into trouble when updating files listed in the cache manifest.
Even though the files were downloaded and cached when the page was initially loaded, if a change was made to one (or more) of the files listed on the server, the browser detected the updated manifest file and began pulling down the updated file(s). However, the update would halt with an error part way through the process, but only in Firefox; the update process worked fine in Safari and Chrome.
There does not appear to be any way to determine which file was being downloaded when the error event is fired and the server logs only showed status codes of 200 and 304 (as expected) but no 4xx or 5xx status codes. As it turned out, the server never received a request for the file that caused the error anyway.
After a lot of frustration and futile debugging steps, I began hacking entries out of the manifest file and eventually narrowed the problem down to a single file. Although the file existed it was empty and, evidently, Firefox 3.6.3 does not like having empty files included in the cache manifest. The behavior was the same on both Mac OS X and Linux. (My guess is that the problem exists on other platforms too, but I have not verified that it does.) As I mentioned above, the problem did not occur with the current versions of Safari or Chrome; nor does the problem exist with the most recent Firefox 3.7 nightly build.
The obvious fix is to avoid including any empty files in the cache manifest. And for good measure, don’t reference any empty files anywhere else in the web app to avoid accessing files that are not included in the offline cache when the user is working offline.

