examples-browser/offline-data/sw.js
function fromCache(request) {
  return caches.open(CACHE).then(function (cache) {
    return cache.match(request).then(function (matching) {
      return matching || Promise.reject('no-match');
    });
  });
}
function fromCache(request) {
  return caches.open(CACHE).then(function (cache) {
    return cache.match(request).then(function (matching) {
      return matching || Promise.reject('no-match');
    });
  });
}
function fromCache ( request ) { return caches . open ( CACHE ) . then ( function ( cache ) { return cache . match ( request ) . then ( function ( matching ) { return matching || Promise . reject ( 'no-match' ) ; } ) ; } ) ; }
Open the cache where the assets were stored and search for the requested resource. Notice that in case of no matching, the promise still resolves but it does with `undefined` as value.
Open the cache where the assets were stored and search for the requested resource . Notice that in case of no matching the promise still resolves but it does with undefined as value .