html manifest attribute fixes: 3
3. updating the cached resources AND ALSO modifying the Manifest file + using window.applicationCache object
Tests results:
- Ok: re-accessing the page in a new tab
- Ok: refreshing the page
- Ok: closing ⁄re-opening browser and re-accessing the page
Video demonstration html manifest attribute: Fixes 3
HTML5 manifest file Fixes, Tutorial
min | video details |
---|---|
00:08 | clear recent history: cache, offline data... |
00:12 | access about:cache page |
00:17 | the Offline cache directory is empty |
00:21 | accessing index.php file which is linked to the manifest file test.appcache |
00:23 | Allow data storage for Offline use |
00:25 | refreshing the about:cache page |
00:28 | the Offline cache directory is NO LONGER empty: 5 resources have been stored locally |
00:29 | accessing the List of Cache Entries |
00:41 | we will update the index.php file which is stored locally (= a cached resource) |
01:05 | changing the manifest file: on the commented line we've passed from v111 to v112 [we made a change for the browser to know that the manifest file has changed and to re-cache it] |
01:10 | in this video tutorial we will see how we can make the browser re-cache the updated resources using JavaScript |
01:19 | the JavaScript code inside index.php file: if window.applicationCache's status is UPDATEREADY, then swap cache and reload the page |
01:39 | re-uploading the changed cached resources: index.php and test.appcache Will the updates display ? |
01:45 | Test 1: re-accessing the cached page in a new tab Test result: OK the cached resources got updated and display on page |
01:58 | Test 2: refreshing the cached page Test result: OK the cached resource, got updated and display |
02:01 | Test 3: closing and reopening the browser AND re-accessing the page Test result: OK the cached resources got updated and display |