I am trying to implement GZip compression for my asp.net page (including my CSS and JS files). I tried the following code, but it only compresses my .aspx page (found it fro
You can just add the following to your web.config file within the element:
NOTE: If you are using an older version of IIS (less than v7.5), you may want to set doDynamicCompression to false because the process was CPU intensive. These issues were cleared up in IIS 7.5.
Reference: https://docs.microsoft.com/en-us/iis/configuration/system.webserver/urlcompression