title: WorkBox using workbox.strategies.staleWhileRevalidate - cache not updating
body: <p>We have a SPA - Single Page App, loaded via a index.php page and then all interactions / requests are AJAX calls using jQuery 3.2.1.</p>
  
  <p>In our service worker we are using:</p>
  
  <pre><code>importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');
  
  if (workbox) {
      console.log(`Workbox is loaded`);
  } else {
      console.log(`Workbox didn't load`);
  }
  
  workbox.routing.registerRoute(
      // Cache CSS files
      /.*\.js/,
      // Use cache but update in the background ASAP
      workbox.strategies.staleWhileRevalidate({
          // Use a custom cache name
          cacheName: 'js-cache',
          plugins: [
              new workbox.expiration.Plugin({
                  // Only cache requests for a day
                  maxAgeSeconds: 1 * 24 * 60 * 60,
                  // Only cache 40 requests.
                  maxEntries: 40,
              }),
          ]
      })
  );
  </code></pre>
  
  <p>This works - loads the files from server and creates the cache:</p>
  
  <p>However never versions of JS files are not picked up - I close the web tab and reload the app and the old version of the JS file is presented to the app.</p>
  
  <p>I expected "staleWhileRevalidate" to fetch the updated JS file in an async request and to update the cache for next time.</p>
  
  <p>Any suggestions appreciated.</p>