HTML5のapplication cache apiを使ってみているのですが、
オフライン時でもページアクセス時にmanifestファイルへのリクエストが発生して、
それがコケるもんだから困ってました。
が、解決策は「manifestファイル自身もmanifestに書けばよい」でした。単純明快。
Note: A URL in the list can be flagged with multiple different types, and thus an entry can end up being categorized as multiple entries. For example, an entry can be a manifest entry and an explicit entry at the same time, if the manifest is listed within the manifest.
(超意訳:…たとえば、manifestファイルをmanifestに記載した場合、それはmanifestエントリであると同時にexplicitエントリになります。)
デフォルト動作としては、manifestに書かない場合はmanifest自体はexplicitエントリ(キャッシュ対象)じゃないんですね。
manifest指定しているhtmlは暗黙的にキャッシュ対象になるのでややこしい。
なので、明示的にmanifestファイル自身もmanifestに記載しておきましょう。(※キャッシュ対象にしたくないなら NETWORK: セクションの下に書けばOK)
そうすることで、manifestファイルが取得できない場合はキャッシュを使用するようになります。
もちろんmanifestファイル自体をキャッシュ対象にしたとしても、自分でapplicationCache.update()を呼べばちゃんと更新チェックに行ってくれるので、多い日も安心です(?)
参考:
http://www.html5rocks.com/ja/tutorials/appcache/beginner/