How to implement static and Dynamic Web page gzip compression under IIS

Source: Internet
Author: User
Tags metabase

What is gzip page compression.

I believe many friends see "gzip page compression" are unfamiliar, in the end what is gzip page compression. Do SEO friends often use Chinaz webmaster tools to query Some Web site information, SEO comprehensive query information, one of which is Gzip Web page compression detection, please look below: (I have successfully carried out gzip page compression), directly on the map to compare the Web page compression before and after the gap:

Gzip Compressed Web page after the gap is not general big ah, compression than to see the know.

What is the benefit of gzip compression for Web pages.

The benefits must be some:

1. After compressing the data of the webpage is small, the user visit speed will be accelerated;

2. But will increase the load of the server, both pros and cons

How IIS Opens a Web page gzip compression.

This article tests the environment is vps,iis, other circumstances may not be quite the same, below share the concrete realization process:

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;


2. In Internet Information Services (IIS) Manager, right-click "Web Service Extensions"-"Add a new Web service extension ...", enter the extension "HTTP Compression" in the new Web service Extension box, and add "required files" as C:\ Windows\system32\inetsrv\gzip.dll, where the Windows system directory may vary depending on your installation, select "Set extension status to allow";



3. Use a text editor to open C:\Windows\System32\inetsrv\MetaBase.xml (recommended to back up first),

Ctrl+f key to find IIsCompressionScheme, there are three pieces of the same name, respectively, is deflate,gzip,parameters, the third paragraph do not pipe it, the first two paragraphs have basically the same parameters

HcDynamicCompressionLevel, set compression rate, take value 0~10,0 not compression, 10 maximum compression rate, here set to 9, 9 is the most cost-effective one.

HcFileExtensions, you need to compress the static file name extension, default only Htm,html,txt, you can add Js,css,xml. It is suggested that the original format be separated by a newline.

HcScriptFileExtensions, you need to compress the dynamic file name extension, such as adding php,aspx.


4. Do not hurry to save the MetaBase.xml after editing, to turn off IIS first, open the Start-Control Panel-management tools-services, stop

IIS Admin Service, and then save.


5. Restart IIS, this is basically done.


Apply this configuration website Taiyuan website construction

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.