Secondly, the ranking of keywords is also related to the opening speed of web pages (reference: important factors affecting keyword rankings). This mainly reflects the search engine's user experience. If the user experience is good, the ranking will be better than other websites. Therefore, I think it is necessary for us to increase the opening speed of web pages. This does not require too much cost investment, you just need to pay more attention to some tips in your daily life! Here are some tips for your reference: 1. Optimize CSS. We know that the emergence of CSS separates the content and element presentation methods. When a user opens a web page designed with CSS, CSS is generally downloaded to the user's local computer. Unlike HTML element presentation tags, which need to be called once for each web page of the website, with CSS, it only needs to be called once! In addition, CSS can replace pictures in some places, which is why div+css is advocated now! However, when using dw to write CSS, there will be some redundant CSS code. If CSS is too bloated, it will also affect the speed of the web page. Here I would like to recommend a tool, cleancss, for everyone to try. It is an online tool. Another way is to streamline the code manually. This is indeed difficult for novices. However, reading more articles on streamlining CSS techniques will be helpful to you. After reading more, you will know which codes can be streamlined. 2. Optimize pictures. There is no trick to this, it can be done through software. I like to use PS. In PS, I choose the format used to store the image for the web, and then choose options such as the quality of the image. As long as the image looks clear and is of the right size, I can save it. 3. Picture format problem. Choosing the right image format is very important. Jpg is generally used for photos or true color images, gif uses flat color images, generally used for buttons or logo images, png and gif are very similar, but they support more colors! 4. The problem of marking the length and width of the picture. This problem can usually be seen in HTML, and some people often forget to write the length and width of the picture. These tags tell the browser the size of the image before opening it. The browser will reserve an area when loading the web page, speeding up the display of the entire web page. 5. Learn to use "/" in URLs. When a user opens a URL without a "/" at the end, the server has to determine what type of file or web page it is. If you add a "/" at the end of the URL, the server will know that it is a directory page, reducing loading time. 6. Reduce the number of responses of web pages. Opening a web page is actually a very complicated process. From the application opening of the web page, to the response of the web server, compilation and other actions, and then sending it back to the browser, the text, pictures, multimedia files, etc. are displayed in front of us. So I want to reduce the number of responses as much as possible, and now ajax is well used in this regard. Of course, a static page is an exception. For a static page, you just need to pay more attention to the image size and web page design. |
<<: Tomcat breaks the parent delegation mechanism to achieve isolation of Web applications
>>: Detailed explanation of the difference between device-width and width in CSS3 media queries
Recently, I received a requirement for function ex...
A record of an online MySQL transaction problem L...
1. Use of alias The alias command is used to set ...
Two ways to enable proxy React does not have enca...
CAST function In the previous article, we mention...
Here's a solution to the problem where margin...
This article shares the specific code of vue echa...
The position property The position property speci...
1. Set the list symbol list-style-type: attribute...
——Notes from "MySQL in Simple Terms (Second ...
Preface Every developer who comes into contact wi...
Introduction The mysql-utilities toolset is a col...
1. Installation process MySQL version: 5.7.18 1. ...
EXPLAIN shows how MySQL uses indexes to process s...
Preface This article mainly introduces the releva...