title: Service worker - chrome mobile, works only in incognito mode
body: <p>I am trying to use service worker to make my website work offline. 
  My sw.js:</p>
  
  <pre><code>var cacheName = 'v40aswedsdfsadg';
  var url = "https://spreadsheets.google.com/feeds/list/1LEGGLbrp3hqsN_CyZQMpmrUs5QTajjgjXyCgfwwIDQk/1/public/values?alt=json";
  var cacheFiles = [
      './',
      './index.html',
      './js/app.js',
      './css/app.css',
      './vendor/jQuery/dist/jquery.min.js',
      './vendor/angular/angular.min.js',
      './vendor/lodash/dist/lodash.min.js',
      './vendor/gs2json.js',
      url
  ];
  
  self.addEventListener('install',function(e){
      console.log('[SW] install');
      e.waitUntil(
          caches.open(cacheName).then(function(cache){
              console.log('[SW] add cache');
              return cache.addAll(cacheFiles);
          })
      );
  });
  self.addEventListener('activate',function(e){
      console.log('[SW] activate');
      e.waitUntil(
          caches.keys().then(function(cacheNames){
              return Promise.all(
                  cacheNames.map(function(thisCacheName){
                      if(thisCacheName!==cacheName){
                          console.log('[SW] delete cache: '+thisCacheName+'-&gt;'+cacheName);
                          return caches.delete(thisCacheName);
                      }
                  }));
          })
      );
  });
  self.addEventListener('fetch', function(event) {
      console.log('[SW] fetch: '+event.request.url);
      event.respondWith(
          caches.match(event.request)
              .then(function(response) {
                  // Cache hit - return response
                  if (response) {
                      console.log('[SW] Loaded "'+response.url+'" from cache');
                      return response;
                  }
                  var fetchRequest = event.request.clone();
  
                  return fetch(fetchRequest).then(
                      function(response) {
                          console.log('[SW] fetch: '+response.url);
  
                          if(!response || response.status !== 200) {
                              console.log('[SW] fetch failed: ',!response, response.status!==200);
                              alert('fail');
                              return response;
                          }
  
                          var responseToCache = response.clone();
  
                          caches.open(cacheName)
                              .then(function(cache) {
                                  console.log('[SW] put response to cache');
                                  cache.put(event.request, responseToCache);
                              });
                          return response;
                      }
                  );
              })
      );
  });
  </code></pre>
  
  <p>It works great when using chrome. </p>
  
  <p>It doesn't work on chrome mobile:
   - I don't get offline error (it means service worker works)
   - data from https won't load
   - first load works fine (when fetching data from url)
   - second and any next load doesn't work (blank page = no data loaded)</p>
  
  <p>It works on mobile chrome when in incognito mode (data fetched from cache fine).</p>
  
  <p>Anyone who can help me figure this out?</p>
  
  <p>Edit:
  Just tested it on mobile firefox and it does work too. It seems it is a problem with mobile chrome..</p>