title: JS file loading garbled in IE and shows Invalid character while it works in other browsers
body: <p>I have a web page which has two external JS files being served from AWS bucket. This works fine in non-IE browsers but when I open the webpage in IE(11), it shows be "Invalid character" error as shown below</p>
  
  <p><a href="https://i.stack.imgur.com/fKN8J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fKN8J.png" alt="Console Error in IE"></a></p>
  
  <p>When I check the script in the IE debugging tool, it shows the script as garbled as shown below </p>
  
  <p><a href="https://i.stack.imgur.com/88fZo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/88fZo.png" alt="Garbled JS file in IE"></a></p>
  
  <p>But when I download that file from chrome and host that locally, it works in IE. I suspect it must be encoding and/or gzip issue? But can't seem to figure out exactly.</p>
  
  <p>HTTP Header of the JS file is given below -</p>
  
  <pre><code>HTTP/1.1 200 OK
  Content-Type: application/javascript
  Content-Length: 211091
  Connection: keep-alive
  Date: Sat, 02 Feb 2019 11:25:08 GMT
  Last-Modified: Fri, 01 Feb 2019 20:14:34 GMT
  ETag: 12410f7c12c86758ade878921d54ccea
  x-amz-server-side-encryption: AES256
  Cache-Control: max-age=315360000, no-transform, public
  Content-Encoding: gzip
  Expires: Sat, 01 Feb 2020 20:14:26 GMT
  Accept-Ranges: bytes
  Server: AmazonS3
  X-Cache: Miss from cloudfront
  </code></pre>