2003 server turn on gzip compression

Source: Internet
Author: User
Keywords Server 2003 gzip compression

&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; I have written an article before, To tell the Linux Apache server or virtual host of WordPress open gzip compression, and open the actual effect of compression can also be seen through the article in the picture. However, although the Linux server is more recommended, and Windows Server platform is also thinking 2008 and 2012 popular, but the use of Windows2003 system + IIS6.0 server webmaster actually have a lot of, so how to open gzip compression in such environment, still be worth talking about.

The first step is to open the Internet Information Services (IIS) Manager, right-click the "Site"-"properties", go to the Services option, and then select "Compress application Files" and "Compress static files" in the large box in "HTTP Compression", and "temporary directory" and "temporary directory maximum Limit" Use the default value directly.

In the second step, or in Internet Information Services (IIS) Manager, right-click the Web Service Extensions option, select Add a new Web service extension, and in the new Web service Extension box, enter the extension "HTTP Compression", "Required files" Add the path for C:windowssystem32inetsrvgzip.dll, generally most Windows2003 server should be this path, if there is very special, please according to their own situation to choose the position of Gzip.dll, remember to " Set extended status to allow "Also tick, then click OK.

Step three, come to the critical step. To stop the IIS6.0 server, enter "cmd" in "Run", go to the command line, and enter "net stop IISAdmin" to stop the IIS service. Back up again. C:windowssystem32inetsrvmetabase.xml This file (should be backed up before modifying any one of the server's profiles, which is the essential quality of the individual webmaster), then open the file in Notepad and make changes to the related settings.

There are two places to change, one is location = "/lm/w3svc/filters/compression/deflate", the other is location = "/lm/w3svc/filters/compression /gzip ", the two places can be modified to open gzip. Content changes in two places are exactly the same, so just say it again.

Set the hcdodynamiccompression to "TRUE", which is used to compress the dynamic files, but if you do not intend to compress the dynamic files, it is OK to keep the "FALSE" state. And HcScriptFileExtensions is the need to compress the dynamic file suffix, such as ASP, PHP, aspx and so on.

Set HcDoStaticCompression and HcDoOnDemandCompression to "TRUE", which is used to open compressed static files, and there is no reason not to open them. Add static file suffixes that need to be compressed in hcfileextensions, such as HTML, CSS, XML, and so on.

The HcDynamicCompressionLevel and HcOnDemandCompLevel properties, which represent the gzip compression rate, can be filled with a number between 0-10, the default is 0, and usually the recommended setting is 9, which is the most cost-effective choice. (The picture of PHP added to the static file inside, we ignore it, this is a long time ago configured, anyway, the site is static, PHP compression does not matter)

When you have finished modifying, open the IIS server, still on the command line, and enter the "iisreset" command. In this way, gzip compression opened, you can use webmaster Tools on their own page to check to see how the effect.

It should be noted that when you modify the MetaBase.xml file, you may be unable to save, you will be prompted to "file is in use, cannot be saved", to resolve this issue, open IIS, right-click Local computer-Properties, and in Internet Information Services, tick Allows you to edit the configuration database directly, and then you can successfully edit the MetaBase.xml file.

After the opening of the Gzip, the Web site will have a more obvious increase in speed, but also can save a lot of bandwidth and traffic, resulting in the CPU resource consumption does not matter. There have been people worried about the search engine on gzip compression page crawling problem, the fact that there is no problem, as long as the user's browser can be normal access to the page, search engine crawling up no problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.