I have a manifest that looks something like this:<div><br></div><div><div><font face="courier new, monospace">CACHE MANIFEST</font></div><div><font face="courier new, monospace"># e4a75fb378cb627a0d51a80c1cc5684c2d918d93e267f5854a511aa3c8db5b1a</font></div>
<div><font face="courier new, monospace">/a/application.js</font></div><div><font face="courier new, monospace">/a/application.css</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">NETWORK:</font></div>
<div><font face="courier new, monospace">*</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">FALLBACK:</font></div><div><font face="courier new, monospace">/ /offline</font></div>
</div><div><br></div><div>Notably, it has a "/ /online" fallback section which is, obviously, a prefix for every page on my site. This is good, because the goal is to have my users redirected to what's at /offline when they navigate to <a href="http://www.mydomain.com">www.mydomain.com</a> while offline.</div>
<div><br></div><div>As the fallback section is a prefix for everything, it's a prefix for any url/path that results in an error condition such as a 404 or 500 response. Since there is an error, and the url matches, the fallback section is triggered, displaying the contents of /offline and not the response from the given URL.</div>
<div><br></div><div>It seems that the application cache, when it encounters an error state such as a 404 or 500, doesn't check to see if the browser is still in the 'online' state, and immediately falls over to the fallback section.</div>
<div><br></div><div>While online, I would expect my 4xx and 5xx page to be rendered normally.</div><div><br></div><div>Finally, the fallback section in my example is very typical of most examples I find in various docs, including the whatwg spec. I don't think I'm doing anything abnormal here.</div>
<div><br></div><div>Should I design this differently or is there something missing from the spec?</div><div><br></div><div>Thanks,</div><div>Josh</div><div><br></div><div><br></div>