html manifest attribute NETWORK section
Manifest appcache NETWORK section
The Manifest NETWORK section allows you to add the resources to be loaded from Server all the time (non-cached resources):
- is one of the 3 sections of a manifest file
- the NETWORK section is optional: syntax1
- each resource must be listed on a distinct row: syntax2
- all resources (*), except the non-cached ones (resource1, resource2), should be loaded from Server syntax3
- NETWORK section can be added more than once inside the manifest file: syntax4
- sections order(CACHE, NETWORK, FALLBACK) does not matter: syntax4
Examples file.appacache: NETWORK section
1 2 3 4 5 6 7 8 | CACHE MANIFEST resource1 resource2 folder1/index.php fallback.php |
1 2 3 4 5 6 7 | CACHE MANIFEST resource1 resource2 resource_a resource_b |
1 2 3 4 5 6 | CACHE MANIFEST resource1 resource2 * |
1 2 3 4 5 6 7 8 9 | CACHE MANIFEST resource1 resource2 resource_a resource_b |
1 2 3 4 5 6 7 8 910 | CACHE MANIFEST resource_a resource1 resource_b |
Video demonstration html manifest attribute: NETWORK section
HTML5 appcache NETWORK section, Tutorial
min | video details |
---|---|
00:03 | please watch the previous tutorial called "manifest:cache" where we presented the 1st section: CACHE, because in this tutorial we will focus on the 2nd one called: NETWORK |
00:21 | adding the NETWORK section to our manifest file and a * |
00:25 | EXPLANATIONS: - cache "main.css" file and load it from Offline cache folder (your pc) the 2nd time you access the same cached html page - all the rest (*) uncached resources, when Online, load them, from Server |
00:29 | the 3 cached resources |
00:33 | the uncached resources are the 2 images: ck91.png, w3video.png |
00:51 | the demo files have been uploaded on server; accessing the cached file "manifest.php" with its cached resources "main.css" and the manifest file itself (test.appcache) |
00:58 | "Allow" files local storage for Offline use |
01:05 | accessing the "about:cache" page and checking the offline stored resources: the 3 files |
01:27 | testing Offline ⁄ Online: 1. Offline: should load only the 3 resources → ok 2. Online: should load the 3 cached resources from pc and the rest of them from Server (the 2 images) → ok |
00:00 | Note: when caching resources (adding only the 1st section CACHE or none, in which case the resources are added right under the CACHE MANIFET): when testing Online and IF the rest of the resources does not load from Server, then add the 2nd section : NETWORK and * like this: MANIFEST FILE CACHE: main.css NETWORK: * |