Iis6.0 Asp.net Application Deployment gzip compression function

Source: Internet
Author: User
Tags metabase

gzip , I heard that in iis6.0 The self-built system has good results. It happened that the newly developed system was suffering from complaints about slow Internet access (which blame me for not having to blame? Who is the company mean bandwidth, one 2 m ADSL )... Try the effect .. Hey ..

In IIS 6.0ConfigurationHTTPCompression

1. HTTP Compression Overview HTTP Compression is performed on Web Transfer the compressed text content between the server and the browser. HTTP Common compression is used for compression.AlgorithmFor example Gzip Compression Html , Javascript Or CSS File.
2. HTTP How compression works Web Server Processing HTTP The compression principle is as follows:
Web The server receives HTTP After the request, check whether the browser supports HTTP Compression; If the browser supports HTTP Compression, Web The server checks the suffix of the request file; If the request file is Html , CSS And other static files, Web Check whether the latest compressed file of the requested file already exists in the compressed buffer directory on the server; If the compressed file of the requested file does not exist, Web The server returns the uncompressed request file to the browser and stores the compressed file of the request file in the compression buffer directory; If the latest compressed file of the request file already exists, the compressed file of the request file is directly returned; If the request file is Aspx Dynamic files, Web The server dynamically compresses the content and returns it to the browser. The compressed content is not stored in the compressed cache directory.
3. the IIS 6.0 Configuring HTTP Compression steps In IIS 6.0 Configuring HTTP The compression procedure is as follows:
1. Open Internet Information Service (IIS) Manager,Right-click ' Website ' (Not the default website.) ->' Attribute ' ,Select ' Service ' .In 'Http Compression ' BoxSelected ' Compressing applicationsProgramFile ' And ' Compressing static files ' , As neededSet ' Temporary directory ' And ' Maximum temporary directory limit ' ;

2. In Internet Information Service (IIS) Manager, right-click 'Web Service Expansion '->' Add a new Web Service Expansion ...' , In ' New Web Service Expansion ' Enter the extension 'Http compression' , Add ' Required file ' Is C: \ windows \ system32 \ inetsrv \ gzip. dll , Where Windows The system directory may vary depending on your installation. Select ' Set the scaling status to allow ' ;

3. open ' Start '-> ' management tools '-> ' service ' , stop 'iis admin service' ,

Open with a text editorC: \ windows \ system32 \ inetsrv \Metabase. xml(We recommend that you back up data first.),

FindLocation = '/lm/w3svc/filters/compression/gzip',

To Compress dynamic filesHcdodynamiccompressionSet'True', AndHcscriptfileextensionsAdd the suffix of the dynamic file you want to compress, as shown in figureAspx;

To Compress static files Hcdostaticcompression And Hcdoondemandcompression Set 'True' , And Hcfileextensions Add the suffix of the static file to be compressed, as shown in figure XML , CSS , JS And so on;

hcdynamiccompressionlevel and hcondemandcomplevel indicates the required compression rate, the smaller the number, the lower the compression ratio. It is generally set to 9 most suitable ; Save after editing metabase. XML file;

HoweverAfter,RestartIIS.

Finally, the access speed of the Internet is indeed improved, not to mention the Intranet ..Happpy... This isCodeAnother technology above art...

 

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.