title: Angular 7 service worker caching audio file causes range header issues on safari
body: <p>In my angular app there is an issue with the range request header for any <code>new audio(audio src here)</code> request on safari. When requesting audio from a server the duration of the audio file is returned as normal. However, when requesting the audio from the service worker it returns the audio duration as Infinite.</p>
  
  <p>I've had a google around and Safari apparently has this issue where it sets the range header for cached media files to 'bytes=0-1' which is where the issue lies as shown below: 
  <img src="https://i.stack.imgur.com/S3bwl.png"/></p>
  
  <p>Is there a way in angular to intercept a <code>new audio(audio src here)</code> request and modify the headers or somehow exclude any media requests from the service worker caching policy?</p>
  
  <p>My current service worker config is below: </p>
  
  <pre><code>{
    "index": "/index.html",
    "assetGroups": [
      {
        "name": "app",
        "installMode": "prefetch",
        "resources": {
          "files": [
            "/assets/img/logo.png",
            "/assets/img/no-internet-icon.jpg",
            "/favicon.ico",
            "/index.html",
            "/*.css",
            "/*.js"
          ]
        }
      },
      {
        "name": "assets",
        "installMode": "lazy",
        "updateMode": "prefetch",
        "resources": {
          "files": [
            "/assets/**"
          ]
        }
      }
    ]
  }
  </code></pre>