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