Detection results in the speed diagnostics of the Web site of the card network:
The HTML page has successfully enabled gzip compression
The CSS file was not successfully enabled for GZIP compression
Later, the study found that IIS enabled gzip when the default compression of only HTML pages, if you need to compress CSS, JS and other files, but also need to configure a simple file.
Open C:\WINDOWS\system32\inetsrv\MetaBase.xml This file, and then look for "IIsCompressionScheme", will find that there are three paragraphs, the back of the tube, only set the front two can be. where "/lm/w3svc/filters/compression/gzip" is used to set gzip compression, and "/lm/w3svc/filters/compression/deflate" is used to set deflate compression.
If you want to compress static files, set HcDoStaticCompression and HcDoOnDemandCompression to "TRUE" and add the static files that need to be compressed in the HcFileExtensions properties: CSS, JS, etc.
To compress the dynamic files, set HcDoDynamicCompression to TRUE and add the dynamic files that need to be compressed in the HcScriptFileExtensions attribute: aspx, PHP, and so on.
In addition, the HcDynamicCompressionLevel property and HcOnDemandCompLevel properties are generally recommended to set to 9, with the best price/performance.
Refer to the following parameter settings:
<iiscompressionscheme Location = "/lm/w3svc/filters/compression/deflate"
Hccompressiondll= "%windir%\system32\inetsrv\gzip.dll"
hccreateflags= "0"
hcdodynamiccompression= "TRUE"
hcdoondemandcompression= "TRUE"
hcdostaticcompression= "TRUE"
Hcdynamiccompressionlevel= "9"
hcfileextensions= "htm
Html
Txt
Css
Js
xml
Hcondemandcomplevel= "9"
hcpriority= "1"
hcscriptfileextensions= "ASP
aspx
Dll
Exe
>
</IIsCompressionScheme>
<iiscompressionscheme Location = "/lm/w3svc/filters/compression/gzip"
Hccompressiondll= "%windir%\system32\inetsrv\gzip.dll"
hccreateflags= "1"
hcdodynamiccompression= "TRUE"
hcdoondemandcompression= "TRUE"
hcdostaticcompression= "TRUE"
Hcdynamiccompressionlevel= "9"
hcfileextensions= "htm
Html
Txt
Css
Js
xml
Hcondemandcomplevel= "9"
hcpriority= "1"
hcscriptfileextensions= "ASP
aspx
Dll
Exe
>
</IIsCompressionScheme>
After setting up, restart IIS, and then detect when the CSS, JS and other files have been successfully enabled Gzip.
You may also be interested in the following articles
Detailed tutorial "Illustration" of IIS enabling gzip compression