Offline appcache, does page need to be cached to fallback?

I have a multipage site, I want everything to redirect to /offline/index.html if the user tries to load without a connection.

I’m running /offline/index.html in a hidden iframe at the footer of every page to avoid appcache growing too large in size (the default behaviour is to cache every page the user visits).

Is it possible to get / or /* to fallback to /offline/index.html when they are not part of the cache? I.e does a page have to have a cached version in order to fallback, or does the browser just look at the current URL and use the appcache to load from cache without trying to render the non-cached page?

Here is my offline.appcache




/ /offline/index.html


/ and all other pages – <html lang="en">

with this in an iframe in footer of every page:

/offline/index.html – <html lang="en" manifest="offline.appcache">

Source: html5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.