html manifest attribute FALLBACK section
Manifest appcache FALLBACK section
The Manifest FALLBACK section allows you to specify which alternative resource should be loaded from the local machine (resource previously cached) when it can't be loaded from Server:
- is one of the 3 sections of a manifest file
- the FALLBACK section is optional: syntax1
- each resource must be on a distinct row: syntax2
- FALLBACK section can be added more than once inside the manifest file: syntax3
- sections order does not matter: syntax4
Examples file.appacache: FALLBACK section
1 2 3 4 5 6 7 8 | CACHE MANIFEST resource1 resource2 resource_a |
1 2 3 4 5 6 7 8 910 | CACHE MANIFEST resource1 resource2 * x/index.php manifestb.php y/index.php manifestc.php |
1 2 3 4 5 6 7 8 910 11 12 13 14 15 | CACHE MANIFEST z/index.php manifestc.php resource1 resource2 * x/index.php manifestb.php y/index.php manifestc.php |
1 2 3 4 5 6 7 8 910 11 | CACHE MANIFEST z/index.php manifestc.php resource1 resource2 * |
Video demonstration html manifest attribute: FALLBACK section
HTML5 appcache FALLBACK section, Tutorial
min | video details |
---|---|
00:03 | please watch the previous 2 tutorials called "manifest:cache" and "mnifest:fallback" where we presented the first 2 sections: CACHE: and NETWORK: because in this tutorial we will focus on the 3rd one called: FALLBACK |
00:45 | adding the FALLBACK: section to our manifest file followed by the fallback resources |
00:55 | the next line: x/index.php manifestb.php means: - load "manifestb.php file from pc ONLY IF the index.php file from x folder can't be loaded from Server |
01:20 | the demo files have been uploaded on Server |
01:20 | accessing the html file which is linked to a manifest file |
01:22 | allowing the storage of the Offline files specified in the manifest file |
01:26 | accessing the "about:cache" page and checking the offline stored resources: the 4 files |
01:48 | Please Note: the manifestb.php file has been stored locally for Offline Use and will display if the file, path: x/index.php can't be displayed from Sever |
01:58 | testing Offline ⁄ Online: 1. Offline: should load only the 3 resources → ok 2. accessing the index.php file specified at FALLBACK section: manifestb.php file displays because we're on Offline mode, the server can't be accessed |
02:43 | putting down the Server, temporarly - test |
02:47 | 3. Online:accessing the index.php file from x folder from Server, - manifestb.php file displays instead; the specified fallback ressource |