0

I am trying to get the Cache Manifest to fallback to an offline.aspx page when offline.

So when the current page that contains the following cache manifest is loaded online it displays as normal, but when there is no internet connection offline.aspx is shown instead of the current page.

CACHE MANIFEST
# v1.39

NETWORK:
*

FALLBACK:
/ /offline.aspx

Is this possible? Am I understanding that you can replace the current page offline with a fallback page? Is my manifest file correct?

I replaced the /s with /*s and it still didn't work. Chrome Developer Tools shows the offline.aspx as in the cache as type 'Fallback' and the default.aspx as 'Master'. When offline the offline.aspx never gets shown - it still shows default.aspx. I'm going offline by disabling the Local Area Connection in the Network Adapters in Windows 7.

theringostarrs
  • 11,940
  • 14
  • 50
  • 63

1 Answers1

1

Check these examples:

static.html will be served if main.html is inaccessible

offline.jpg will be served in place of all images in images/large/

offline.html will be served in place of all other .html files (for your case try /* or *)

FALLBACK:
/main.html /static.html
images/large/ images/offline.jpg
*.html /offline.html

p.s.:

Your

NETWORK:
*

should be like:

NETWORK:

/ or /*

these question can help too: HTML5 Cache Manifest: Fallback section & Network *

Community
  • 1
  • 1
jmingov
  • 13,553
  • 2
  • 34
  • 37
  • I replaced the /s with /*s and it still didn't work. Chrome Developer Tools shows the offline.aspx as in the cache as type 'Fallback' and the default.aspx as 'Master'. When offline the offline.aspx never gets shown - it still shows default.aspx. – theringostarrs May 14 '13 at 03:24
  • looks like a bad cached file! here is an article explaining it http://www.html5rocks.com/en/tutorials/appcache/beginner/ – jmingov May 14 '13 at 04:22