Optimized page optimization in the station

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Everyone said "content for the king, outside the chain for the emperor," I said, "to resisting must be in the first!" in the effort to send original articles, high-quality outside the chain, whether there is the Web page, the code itself problem? Yes, even if the benefits and effects of page optimization are minimal, The plateau creates the article and the high quality outer chain already completely may make up or ignores; however, the reference shortly before the chow of the peak of the conversation said: all aspects of a little better, perhaps add up is much better.

Therefore, my suggestion is that the website before the online, the website program itself if the maximum degree of optimization, I believe that the optimization of the site will be more helpful.

Below on my Yangcheng life Network for example, for everyone to explain their own page optimization of some personal insights, welcome to Pat Bricks.

1, page static

Of course, the page static does not have to do, and static is not necessarily the whole station, can only static the most important home. For the processing of different programs, the page's execution time is different; for the online mature CMS system, implementation efficiency from needless to say, believe is a degree of comparison optimization. I program ape one, so the site to write their own, the speed of implementation will indeed be relatively poor so some, and the site's home page more pictures, using Webmaster tool query, the result response time is more than 3 seconds; Finally, the homepage generated HTML static, the corresponding time to dozens of to hundreds of milliseconds, as shown:

  

2, reduce page redirection

The page should try to avoid redirection, take my website for example, Baidu's proposal is:

  

Of course, the screenshot is triggered by the addition of statistical code, which is unavoidable, but in its own code, it is recommended to minimize redirection, which reduces the number of requests and thus less page response time.

3, JavaScript file processing

1 js file as much as possible to merge into a file, reduce the number of requests; For example, there are many JS functions used in the website, then, the functions are unified into a JS function file;

2 JS Position

JS at the end of the page, you can speed up the page opening speed.

3) infrequently changed JS files can be compressed code, so that the size of the JS file reduced greatly reduce the request time

Baidu to the JS file processing recommendations:

  

4, CSS file processing

1 as JS files, CSS files as much as possible to merge into a file, reduce the number of requests;

2 CSS Location

CSS description appears in the post, the page needs to be rendered again, the opening speed is affected.

3 Using CSS Sprite

Csssprites in the country many people call CSS Wizard, is a kind of Web page Picture application processing way. It allows you to include all the bits and pieces of a page that are involved in a larger image, so that when you visit the page, the loaded picture will not show up as slowly as before.

The use of CSS sprites can reduce the HTTP request of the Web page, thus greatly improve the performance of the page, CSS sprites can reduce the number of bytes in the picture, has been compared to more than 3 pictures merged into 1 pictures of the byte is always less than the total number of these 3 pictures.

  

5. Enable gzip

Gzip compression efficiency is very high, usually can achieve a compression rate of 70%, that is, if your Web page has 30K, after compression becomes 9K or so.

6. Character Set declaration

If the <head> part does not define a character set, it increases the number of page renders and slows down.

This article from Yangcheng Life Network Http://www.020life.cnA5 First, trouble reprinted with links, thank you!

Related Article

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.