[html5] fallback section taking over for 4xx and 5xx responses while online
Josh Sharpe
josh.m.sharpe at gmail.com
Wed Aug 22 08:06:53 PDT 2012
I have a manifest that looks something like this:
CACHE MANIFEST
# e4a75fb378cb627a0d51a80c1cc5684c2d918d93e267f5854a511aa3c8db5b1a
/a/application.js
/a/application.css
NETWORK:
*
FALLBACK:
/ /offline
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
www.mydomain.com while offline.
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.
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.
While online, I would expect my 4xx and 5xx page to be rendered normally.
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.
Should I design this differently or is there something missing from the
spec?
Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20120822/1cb3821e/attachment-0001.htm>
More information about the Help
mailing list