Page Performance Optimization-reducing HTTP requests

Source: Internet
Author: User
The first principle of Yahoo page performance is to reduce HTTP requests.
80% of end-user request time is spent on the frontend. Most of the components that are stuck on the download page at these times: images, style sheets, scripts, Flash, and so on. In turn, reducing the number of components reduces the number of HTTP requests that need to submit pages. This is the key to page acceleration.
Technologies to reduce the number of HTTP requests include: Combined files, CSS Sprites, image maps, and Inline images.
Data on the page is transmitted through TCP/IP packets. In a 1 m ADSL environment, the maximum network speed is kb/s, and MTU (maximum transmission unit) is bytes by default. removes the header information of TCP/IP 40 bytes. A package can contain 1460 bytes. The following is an example:

The faster the number of required packages is.

Example: The size of an image is 5.71 KB (5848 bytes). Five packets are required for transmission (5848/1460 = 4.005 ). The data is only 8 bytes more. After optimization to 5840 bytes, you can reduce one transmission package.

It may be nitpicking, but Optimization of any details on key pages is sometimes worthwhile.

Similarly, for the number of links on the page, you can also consider the maximum number of concurrent connections of the browser for detailed optimization. For example, in Firefox, the maximum number of concurrent connections for the same host is 6. The effect of increasing the number of links on the download time is as follows:

When the number of links doubles by 1 from an integer of 6, the download time increases significantly. Considering that the maximum number of concurrent connections in IE6 is 2, minimizing the number of connections to an even number is a good optimization code.

References:
Http://lifesinger.org/blog/2009/07/css-sprite-performance/
Http://developer.yahoo.com/performance/rules.html

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.