It is not required to compress dynamic files (PHP, ASP, and aspx), because the pages are dynamically generated every time, so you can discard them after compression. In the IIS manager, right-click the website and choose "properties". The website is not the following site, but the whole website. Go to the "service" tab and choose to enable dynamic content compression and static content compression.
Select the Server Extension under the website and create a new server extension. The name does not matter. The path of the file to be added below is:
C: \ windows \ system32 \ inetsrv \ gzip. dll and enable this extension.
Static content can be compressed at this time, but for dynamic content, the aspx file is not within the compression range. Because the default file that can be compressed does not have this extension. On the management interface, you cannot find a place where the extension can be added. At this time, you can only modify its configuration file.
There is a metabase under c: \ windows \ system32 \ inetsrv. XML file. You can open it in notepad and find the iiscompressionscheme. There are three segments with the same name, namely deflate, Gzip, and parameters. You do not need to worry about the third segment, the first two paragraphs have basically the same parameters. Add a line of aspx under the parameters hcscriptfileextensions. If you have other dynamicProgramCompression is also added here. Change hcdynamiccompressionlevel to 9 (0-10, 9 is the most cost-effective ).
Then you need to restart the IIS service to realize the compression speed.
However, it may not be too obvious. The CPU usage in the whole process is basically invisible.