Windows2003 server IIS enabled Gzip compression

  

Today they and I said that the website is very slow to open. I have no way to improve the speed of opening. I said that the website now uses too many JS and images, which will cause the website to open. Speed, but if you don't use a lot of JS and pictures, it will affect the aesthetics of the website. Therefore, I only use gzip compression technology on windows2003 server. Now many websites use gzip compression technology, TC blog also The gzip technology used by default makes the website open faster. The speed at which the website opens is a test of the website for both SEO and the viewer and search engine, so it is a challenge for yourself and the website to increase the speed at which the website is opened. Of course, if you are powerful, you can use html to write all of them. I am not so strong. Ok, here's how to use IIS's gzip compression technology in windows2003 server.

1, open IIS Manager

Use the following figure to enable gzip in iis.

Select to enable compressed application files and compressed static files, fill in the maximum capacity Generally it is about 500M-1G. You look at the size of your website space.

2. Add an extension to the WEB extension service.

3. Modify the MetaBase.xml file.

Open C:\\Windows\\System32\\inetsrv\\MetaBase.xml with a text editor (recommended first), find Location =”/LM/W3SVC/Filters/Compression/gzip to set up gzip compression. Find Location = & rdquo; /LM /W3SVC /Filters /Compression /deflate & rdquo; used to set deflate compression. The above two nodes are next to each other and set the same properties.

If you need to compress dynamic files, then HcDoDynamicCompression is set to ”TRUE”, and add the dynamic file suffix name you want to compress in HcScriptFileExtensions, such as aspx; if you need to compress static files, set HcDoStaticCompression and HcDoOnDemandCompression to ”TRUE”, and add the need in HcFileExtensions Compressed static file suffixes, such as xml, css, etc.; HcDynamicCompressionLevel and HcOnDemandCompLevel indicate the required compression ratio, the value is 0-10, the default is 0.

Note the place

When modifying the xml file It is better to back up one first and modify the backup. If you modify directly, you should stop the IIS service first.

The best rate for static compression and dynamic compression is 9. The default is 0.

Image size compression is not very useful.

Copyright © Windows knowledge All Rights Reserved