examples-browser/offline-data/sw.js
function update(request) {
  // don't automatically put 3D models in the cache
  if(request.url.match(/https:\/\/storage.3d.io/)) return fetch(request);

  return caches.open(CACHE).then(function (cache) {
    return fetch(request).then(function (response) {
      return cache.put(request, response);
    });
  });
}
function update(request) {
  // don't automatically put 3D models in the cache
  if(request.url.match(/https:\/\/storage.3d.io/)) return fetch(request);

  return caches.open(CACHE).then(function (cache) {
    return fetch(request).then(function (response) {
      return cache.put(request, response);
    });
  });
}
function update ( request ) { // don't automatically put 3D models in the cache if ( request . url . match ( / https:\/\/storage.3d.io / ) ) return fetch ( request ) ; return caches . open ( CACHE ) . then ( function ( cache ) { return fetch ( request ) . then ( function ( response ) { return cache . put ( request , response ) ; } ) ; } ) ; }
Update consists in opening the cache, performing a network request and storing the new response data.
Update consists in opening the cache performing a network request and storing the new response data .