Use compressed web pages to speed up website browsing

Source: Internet
Author: User
Http://www.ibm.com/developerworks/cn/web/wa-lo-webcompress/index.html

Web page compression is a protocol that is shared by web servers and browsers. That is to say, web servers and browsers must support this technology. Fortunately, the popular browsers currently support this technology, including IE, Firefox, and opera. servers include Apache and IIS. The negotiation process is as follows:

  1. First, the browser requests a URL address and sets the attribute accept-encoding value to gzip, deflate in the request header, indicates that the browser supports gzip and deflate compression methods (in fact, deflate also uses the gzip compression protocol. The difference between the two is described below );
  2. After receiving the request, the web server determines whether the browser supports compression. If yes, the compressed response content is transmitted; otherwise, the uncompressed content is transmitted;
  3. After obtaining the response content, the browser determines whether the content is compressed. If yes, It decompress the content and then displays the content on the response page.

In practical applications, we found that the compression ratio is usually 3 to 10 times, that is, the page with a size of 50 kb, after compression, the actual size of the transmitted content is only 5 to 15 kb, which can greatly save the network bandwidth of the server.ProgramWhen the response is fast enough, the speed bottleneck of the website is switched to the network transmission speed. Therefore, after the content is compressed, the page browsing speed can be greatly improved.

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.