Original : http://developer.yahoo.com/performance/rules.html 2007.3.20 Steve Souders Translated by mask Starting in 2004, I started working on the outlier performance group at Yahoo. We are a very small team that specializes in quality inspection and improvement of Yahoo's products. As a back-end engineer, I am now tinkering with front-end code optimization projects, so I think this is an excellent opportunity for improvement. My goal was to improve the user experience, so I measured the browser response time at various bandwidths and came up with the following graph, which shows the http traffic from http://yahoo.com. ![]() The first label in the above icon is html, which is the first thing loaded in an html document. In this example, reading the html code only accounts for 5% of the entire response time. This result applies to the vast majority of websites. Among the top ten websites sampled in the United States, only one website exceeds 5% but is less than 20%. The remaining 80% of the time is used to read other content on the web page, that is, the front-end (the original text is front-end, which means the rest of the content excluding the html code, which can be pictures, scripts, flash, videos, and various things). This is the key reason why we need to focus on these things to improve display speed. There are three main reasons why you should start from the front end :
Our golden rule is to optimize the front-end performance first, as these things consume 80% of the user-side response time. 1. Reduce the number of http requests <br />Images, css, script, flash, etc. will increase the number of http requests. Reducing the number of these elements can reduce the response time. CSS Sprites technology can reduce the number of image requests, put scattered small images together, and use background-position to change the position of the background image. The premise is that the width and height of the HTML element are defined in advance. In fact, it is like a mask. You will see different scenes when you move the background. Embedded images use the data: URL scheme to embed the image content code directly into the HTML code, which will increase the size of the HTML code. The improved way is to embed the embedded images into CSS (CSS is cached), which will better reduce the number of http requests without increasing the size of the HTML. Many users access your site with an empty cache, so first-time speed is important. The first rule is the most important one. Previous Page 1 2 3 Next Page Read More |
<<: Uncommon but useful tags in Xhtml
I recently watched Rich Harris's <Rethinki...
Operation effect: html <div class="tic-ta...
This article records the installation tutorial of...
CSS plays a very important role in a web page. Wi...
1. What is semanticization? Explanation of Bing D...
1. MS SQL SERVER 2005 --1. Clear the log exec(...
This article example shares the specific code of ...
This article shares the specific code of MySQL 8....
1. Install a virtual machine (physical machine) Y...
Table of contents Pull a centos image Generate ng...
The code looks like this: SELECT @i:=@i+1 rowNum,...
Table of contents Short Introduction 1. Check the...
Table of contents Install Docker on CentOS 8 1. U...
1. Installation 1. Download Go to the MySQL offic...
Preface Recently, when working on a high-availabi...