title: Service worker throwing an net::ERR_FILE_EXISTS error?
body: <pre><code>service-worker.js:1 GET http://localhost:8080/service-worker.js net::ERR_FILE_EXISTS
  </code></pre>
  
  <p>This is the error I get every time I refresh after registering a service worker. I've made sure that the service-worker.js file exists in the root directory. Also the service worker is registered and working fine. But I still keep getting this error. Also I'm working on localhost.</p>
  
  <p>This is my service-worker.js file: </p>
  
  <pre><code>console.log("SW startup");
  
  var CACHE_NAME = "my_cache";
  var urlsToCache = [
    './',
    './css/style.css',
    './js/script.js'
  ];
  
  self.addEventListener('install', function(event) {
    // Perform install steps
    event.waitUntil(
      caches.open(CACHE_NAME)
        .then(function(cache) {
          console.log('Opened cache');
          return cache.addAll(urlsToCache);
        })
    );
  });
  
  self.addEventListener('fetch', function(event) {
    event.respondWith(
      caches.open(CACHE_NAME).then(function(cache) {
        return cache.match(event.request).then(function (response) {
          return response || fetch(event.request.clone()).then(function(response) {
            console.dir(response);
            console.log('hi');
            cache.put(event.request.clone(), response.clone());
            return response;
          });
        });
      })
    );
  });
  </code></pre>
  
  <p>script.js file:</p>
  
  <pre><code>if (navigator.serviceWorker) {
      console.log("ServiceWorkers are supported");
  
  
      navigator.serviceWorker.register('service-worker.js')
          .then(function(reg) {
              console.log("ServiceWorker registered ◕‿◕");
              console.dir(reg);
          })
          .catch(function(error) {
              console.log("Failed to register ServiceWorker ಠ_ಠ");
              console.dir(error);
          });
  }
  </code></pre>