title: Only in Chrome (Service Worker): '... a redirected response was used for a request whose redirect mode is not "follow" '
body: <p>When I refresh (or go offline) in Chrome then I get "This site can't be reached" and the following logged to console: <code>The FetchEvent for "http://localhost:8111/survey/174/deployment/193/answer/offline/attendee/240/" resulted in a network error response: a redirected response was used for a request whose redirect mode is not "follow".</code>. When I refresh in Firefox everything works fine. Could someone explain why this is happening?</p>
  
  <p>Here is my simplified SW.</p>
  
  <pre><code>importScripts("/static/js/libs/idb.js")
  
  var CACHE_NAME = "upshot-cache-version3"
  var urlsToCache = [...]
  
  self.addEventListener("install", event =&gt; {
    event.waitUntil(
      caches
        .open(CACHE_NAME)
        .then(cache =&gt; {
          urlsToCache.map(url =&gt; cache.add(url))
        })
    )
  })
  
  self.addEventListener("activate", event =&gt; {
    clients.claim()
  })
  
  self.addEventListener('fetch', event =&gt; {
    event.respondWith(
      caches
        .match(event.request)
        .then(response =&gt; {
  
          if (response) {
            return response
          }
  
          var fetchRequest = event.request.clone()
  
          return fetch(fetchRequest).then(response =&gt; {
            if (!response || response.status !== 200 || response.type !== 'basic') {
              return response
            }
            var responseToCache = response.clone()
            caches.open(CACHE_NAME).then(cache =&gt; cache.put(event.request, responseToCache))
            return response
          })
  
        })
    )
  })
  </code></pre>