IIS gzip support

Roman Petrenko
Aug 9, 2017 · 2 min read

Script size is quite important as we all know and one of the ways to improve load is obviously to enable gzip support. First thing is to check if our server already provides it by default. Open chrome console -> network tab and click on a script to see network details. If response headers have: Content-Encoding: gzip then we good to go.

In case you can find it then we need to enable it.
In our case, we run dotnet core on IIS*.
In IIS you can find 2 compression types:
Static Compression
Compresses static content from the hard disk. IIS can cache this content by compressing the file once and storing the compressed file on disk and serving the compressed alias whenever static content is requested and it hasn’t changed. The overhead for this is minimal and should be aggressively enabled.
Dynamic Compression
Works against application generated output from applications like your ASP.NET apps. Unlike static content, dynamic content must be compressed every time a page that requests it regenerates its content. As such dynamic compression has a much bigger impact than static caching.

We need check dynamic compression enabled.
Hint: sometimes even after dynamic compression enabled you still don’t find it works. Click on the application and on the right-hand side you will see compression -> make sure it is enabled for your site.

Good luck

Roman Petrenko

Written by

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade