October 2017
Intermediate to advanced
302 pages
7h 27m
English
Fetching the asset manifest sounds exactly like it sounds:
self.addEventListener('install', event => { event.waitUntil( caches.open(CACHE_NAME) .then(cache => { fetch('asset-manifest.json') .then(response => { if (response.ok) { } }) }); );});
Note that we should have no asset-manifest in development; we need to ensure that the request response is okay before proceeding, lest we throw an error.
Read now
Unlock full access