title: Is it possible to cache a dynamic php file with service worker?
body: <p>I am trying to cache the html from a dynamic php-file when logged in (with session-cookie) but the html-file is fetched from the server without the credentials from the session-cookie. (I do not specify a filename in the URL only the path)</p>
  
  <pre><code>let cacheName = 'q2';
  
      let files = [
       '/q/',
       '/q/sw.js',
       '/q/js/main.js',
       '/q/js/init.js',
       '/q/js/lib.js',
       '/q/css/css.css',
       '/q/images/b.jpg',
       '/q/apps/BOK/js/main.js'
      ];
  
  
      self.addEventListener('install', (event) =&gt; {
          event.waitUntil(
              caches.open(cacheName)
              .then((cache) =&gt; {
                  return cache.addAll(files)
                  .then(() =&gt; {
                      console.info('All files are cached');
                      return self.skipWaiting(); 
                  })
                  .catch((error) =&gt;  {
                      console.error('Failed to cache', error);
                  });
              })
          );
      });
  </code></pre>
  
  <p>(I have omitted the self.addEventListener("fetch", function(event) )</p>
  
  <p>When I look at the text/html file from '/q/ the service worker has fetched it from the server without the php session cookie PHPSESSID and the contents is therefore wrong.</p>
  
  <p>(Otherwise it works perfect offline)</p>
  
  <p>Is there a solution to this?</p>