title: Cashing all the static assets at once in a service worker in PWA
body: <p>My question is about caching all the static assets present in a seperate directory (for me it is 'static') at once in the service worker in a PWA. As we know we need to provide a path to the asset to be cashed. E.g, if we want to cache an image 'img.png' then we need to do something like this;</p>
  <pre><code>cache.add(/static/img.png) 
  </code></pre>
  <p>where cache is the element returned by <code>caches.open()</code>.
  And if we want to add multiple files we can do something like this;</p>
  <pre><code>assets = [
  'static/img1.png',
  'static/img2.png'
  ] // and so on.
  
  cache.addAll(assets);
  </code></pre>
  <p>What i want to know is that if there is any way to pass directly all the files present in static folder like;</p>
  <pre><code>cache.add(/static);
  </code></pre>
  <p>But the above line is not working as we can only pass a valid path(URL) not a folder or just a file.</p>