title: why is service workers offline mode not working
body: <p>I am trying to provide offline access for the app. But the code is not working.</p>
  
  <p>the cache is being created and stores all the files but when i reload the page in offline mode only the data loads, without any styling applied.</p>
  
  <p>chrome version: Version 61.0.3163.100 </p>
  
  <p>// app.js</p>
  
  <pre><code>if ('serviceWorker' in navigator) {
      navigator.serviceWorker.register('/sw.js')
          .then(function () {
              console.log('service worker reistered');
          });
  }
  </code></pre>
  
  <p>// service worker js</p>
  
  <pre><code>self.addEventListener('install', function (event) {
        event.waitUntil(
          caches.open('static').then(function (cache) {
              return cache.addAll([
                  '/',
                  'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',
                  'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',
                  '/index.html',
                  '/styles.css',
                  '/app.js'
              ]);
          })
      );
  });
  </code></pre>