Step One:
1. Open Internet Information Services (IIS) Manager, right-click Web site-Properties, and select Services. In the HTTP Compression box, select Compress application files and compress static files, and set the maximum limit for temporary directories and temporary directories as needed;
Step Two:
Select Web Service Extensions > Right margin in the right "key new Web Service Extensions" >, in the New Web service Extension box, enter the extension "Gzip" and add "required files" as C: WINDOWSsystem32inetsrvgzip.dll, where the Windows system directory may vary depending on your installation, select "Set extension status to allow";
Step three: Open c:windowssystem32inetsrvmetabase.xml with a text editor (recommended for backup),
Find location = "/lm/w3svc/filters/compression/gzip used to set gzip compression,
Find location = "/lm/w3svc/filters/compression/deflate" to set deflate compression. The top two nodes are next to each other. And the properties set are the same.
If you need to compress a dynamic file, set HcDoDynamicCompression to TRUE.
And in HcScriptFileExtensions, add the dynamic file suffix name, such as ASPX, that you want to compress;
If you need to compress a static file, set HcDoStaticCompression and HcDoOnDemandCompression to "TRUE".
And in hcfileextensions to add you need to compress the static file suffix name, such as XML, CSS, etc.;
HcDynamicCompressionLevel and HcOnDemandCompLevel indicate the desired compression rate, with a value of 0-10 and a default of 0.
HcDynamicCompressionLevel attribute Description: HcDynamicCompressionLevel Metabase Property
HcOnDemandCompLevel attribute Description: HcOnDemandCompLevel Metabase Property
Description: These two property values are generally recommended to set to 9, with the best price/performance.