Angular's PRE-Gzipped files are not served via IIS?

Viewed 4756

I have prepared all the settings (at my home , Windows 10) for creating and serving js as gz files , but still - I get only the regular js files (with the original size).

Configuration

— Angular's webpack file :

new CompressionPlugin({
      asset: "[path].gz[query]",
     algorithm: "gzip",
     test: /\.js$|\.css$|\.html$/,
     threshold: 10240,
     minRatio: 0.8
 })

— Output files for that configuration:

enter image description here

— Index.html file:

...
<body>
  <app-root>Loading...</app-root> 
  <script src="/dist/polyfills.bundle.js"></script>
  <script src="/dist/main.bundle.js"></script>
</body>
...

Diagnostics

When I navigate to http://kkk.com/index.html , I get the full size files :

enter image description here

Also - looking at the request headers , I do send the Accept-Encoding:gzip, deflate header :

enter image description here

Question

Why doesn't the GZ files served ?


Additional info :

  • There is no 304 responses , I set enter image description here.
  • At my work , windows 7 , same files - I DO(!) see the gziped files :

enter image description here

  • Disabled Antivirus
  • Permissions : Everyone : full control on the file's folder.
  • Comparison between request headers :

enter image description here

  • Since I don't want real time zipping , but PRE-ZIPPING ( files which already gzipped by angular) - I tried enabling AND disabling compression(just to see if it affects something - but it doesn't - I still get the big files) :

enter image description here

2 Answers
Related