anchor.diff: -var CACHE = "cache-and-update9";
  +var CACHE = "cache-and-update10";
   var CACHE_TYPES = [".json", ".js", ".css", ".svg"];
   var OFFLINE_CACHE = "offline-cache";
   
  
positive.code:       var request = evt.request;
        var path = request.url.split("//")[1].split("/").slice(1,1000).join("/");
  
        if (request.method === "GET" && path != "heartbeat" && !path.match(/\.jpg(\?\d*)?$/)) {
          evt.respondWith(
            fetch(request).then(function(response){
              caches.open(CACHE).then(function(cache) {
  
negative.code:   evt.waitUntil(precache());
  });
  
  //clean!
  self.addEventListener('activate', function(event) {
    event.waitUntil(clearOtherCaches());
  });
  
  self.addEventListener("fetch", function(evt) {
    if (evt.respondWith) {
      var serveCachedAsset = CACHE_TYPES.map(function(a){
        return evt.request.url.endsWith(a) || evt.request.url.endsWith(a+"?body=1");
      }).includes(true);
  
      if (serveCachedAsset) {
        // because of how rails caching works, can be served from cache without a thought
        evt.respondWith(fromCache(evt.request));
        evt.waitUntil(update(evt.request));
      }
  