title: Trouble getting Response Compression working for .js files in ASP.NET Core 2.0
body: <p>I've configured my application following these instructions <a href="https://docs.microsoft.com/en-us/aspnet/core/performance/response-compression?tabs=aspnetcore2x" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/core/performance/response-compression?tabs=aspnetcore2x</a>.</p>
  
  <p>I want the defaults (Gzip, Fastest, etc.) so I simply modified by <code>Startup.cs</code> with:</p>
  
  <p><code>services.AddResponseCompression()</code> in <code>ConfigureServices()</code> and <code>app.UseResponseCompression()</code> immediately before <code>app.UseMvc()</code> in <code>Configure()</code>.</p>
  
  <p>This appears to work for the html reponse:</p>
  
  <p><a href="https://i.stack.imgur.com/NTA9W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NTA9W.png" alt="enter image description here"></a></p>
  
  <p>But not for my static JavaScript files, which are more of a concern:</p>
  
  <p><a href="https://i.stack.imgur.com/WA6Zv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WA6Zv.png" alt="enter image description here"></a></p>
  
  <p>According to the documentation <code>application/javascript</code> is specified as a default MIME type for compression.</p>