IIS - Static vs. dynamic compression

Static compression is used for static files. Files that don't change. Files that always return the same content.

E.g.: HTML, .CSS, .JS, .TXT, .JPG, etc.


When a static file is compressed it is saved to disk (see below) so that the next request comes right off the disk. Compression happens only once.
Static compression has O(1) cost.


Dynamic compression is used for pages that generate content dynamically.

E.g.: ASP, ASPX, DLL, EXE.


Dynamic content, such as your list of Amazon.com orders, can't be stored from one request to the next, so the output of a dynamic page request is compressed each time before being returned to the client.
This can result in potentially high CPU usage. Real world CPU usage should be monitored.
Dynamic compression has O(N) cost.


Static compression in IIS 8.5

Compressed files are stored in: C:\inetpub\temp\IIS Temporary Compressed Files\Default App Pool\$^_gzip_C^\INETPUB\WWWROOT


[iis-static-compression.png]

Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath