Last post Jan 07, 2019 07:47 AM by Brando ZWZ
Dec 04, 2018 08:58 AM|ynozsumz|LINK
Hello, I've trying to enable gzip compression feature in my IIS but I'm still encountering a problems.
In my environment I have: Visual Studio 2015, IIS 10, MVC 5, Webpack 4.
All scripts are successfully compressed to *.gz files by Webpack with compression-webpack-plugin.
In according to another posts in this forums I've enabled "Dynamic Content Compression" and "Static Content Compression" in Windows Features:
In the next step I make sure that my project have enabled require options directly in IIS:
Additionaly I've inserted below line to my Web.config:
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
(Please notice, that I include file with .js extension, not .gz despite I have only gz files, but as far I know web browser will obtain js files from server).
After building and runing project I got warning in browser console:
Loading failed for the "script" with source „http://192.168.10.10:8099/Scripts/dist/my.script.js”.
Can anyone help me to make this working? What should I enable (and where?) to allow read and uncompress gz files by IIS?
Dec 04, 2018 10:10 AM|PatriceSc|LINK
And F12 network shows a 404 not found error for the http query to your js file ? For now it seems to me there is perhaps some kind of confusion between deploying and using already compressed files or letting IIS to compress those files on the fly as they
are served ?
It seems you are telling you don't have this js file not even on your server ?
Jan 07, 2019 07:47 AM|Brando ZWZ|LINK
As far as I know, if we want to test whether compression is working or not, use the developer tools in Chrome or Firebug for Firefox and ensure the HTTP response header is set: