Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
The page opening speed of a website directly affects its user experience, imagine a few visitors will waste time in a load faster than 8 seconds on the page, now the Internet information everywhere, visitors can get information from many pages, how to let visitors stay on your page, Optimizing the loading speed of the site is critical.
The HTML code optimization of the Web page is the foundation of slimming the website, reducing unnecessary webpage code is the main means to optimize the client and speed up the load of the website. Code optimization is specifically about markup optimization, which not only reduces the size of the document, but also makes the document easier to maintain and improve the visibility of the search engine. Here are some common code examples that need to be optimized.
1. Delete the annotation characters in the script. In most mainstream browsers, adding HTML comments to a script block is completely unnecessary. It is estimated that the old tooth-dropping browsers did not have users in the use.
2, the event properties (such as onclick= "...", onmouseover= "...", etc.) written in the HTML tag is a very unwise way to reduce the maintainability of the code, while polluting the label. The event properties can be dynamically added through JS, not only flexible control, you can also take advantage of JS client caching, so that these event properties do not have to follow the document request each time.
3, < form method= "Get" >, the default method of form is get, so you can write without writing if you are using the.
4, < input type= "text" > Default property is Text, you can ignore.
5, < meta http-equiv= "Content-type" ... > The character encoding of the specified file has always caused great confusion, Content-type priority is not higher than the HTTP header, when both exist, the request header is preferred, so if you can control the server response and set the header, then mate can safely ignore, Unless the page needs to be browsed locally.
The above is a common method of labeling optimization, for the optimization of the speed of the Web page loading, you can also use some tools for analysis and processing, the author in the previous written "skillfully using Google tools to optimize the loading speed of the home page", for its responsible for the Qilu talent Network as an example of the Web page loading speed optimization analysis, Google's Page-speed tool provides detailed web page speed optimization reports that clearly see what needs to be optimized. The main items to be addressed are:
1, browser cache files. A reasonable setting of the cache expiration time for picture files can improve the loading speed of web pages effectively.
2, "Specify Image Dimensions": Specify the size of the picture. When the browser loads the page, it calculates the size of the picture and increases the load time. So the size of the picture is specified to facilitate the speed of ascension.
3, the tool also provides some methods of code optimization.
Merge JS file, reduce the browser to the JS file read, effectively reduce the number of HTTP requests; In gzip format compression, can significantly reduce the size of text files, thus saving bandwidth and load time;
In the Web site's CSS file, there may be some code that is not in use, this work should be in the site before the release of the Css,js file to check, delete the useless code.
This article is provided by www.qlrc.com Webmaster.