SEO from the details of the compressed Web page file size

Source: Internet
Author: User
Keywords SEO size

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

Taoism Lao Tze has a famous saying "the world great things must be done in the fine, the world difficult will make in easy". This sentence tells us a popular truth, only the grasp of details and tireless pursuit, it may create a country, business, or individual success. SEO is so, there are too many details to be grasped, the size of the Web page optimization is one of them.

In addition to bandwidth, CPU processing speed, the page size is another important variable to load the speed of the Web page. Therefore, the size of the page is directly related to the user experience. At the same time, the Web page size directly affects the spider crawling efficiency, the smaller the page file, the more the page of the spider index in the unit time, the more the number may be included. The importance of Web page file size is evident. So how to effectively compress the size of the Web page file? Mainly from the following several details.

First, open gzip compression

Gzip is a file compression program, the compression ratio at least 40%, the highest or even 80%. It can be used on both IIS and Apache servers, and how to turn on gzip compression is not the focus of this article, and will not be repeated. However, it should be noted that the opening of gzip compression may result in the spider Index after the IIS log return code 200 0 64, see the author of the article "Analysis of IIS log appears 200 0 64 is the site is the precursor of K."

Second, picture, FLASH, video, audio and other optimization

For the image optimization, mainly from the picture itself. As far as possible using JPEG, GIF, PNG and other relatively small picture format, you can use PS or JPEG Imager image compression tools to compress the picture. FLASH, video, audio files can also be compressed using professional tools. In addition, you should optimize the control code that plays Flash, video, audio, and so on. For example, when you select a control code property, you should follow the principle of minimizing and meet basic requirements to remove unnecessary attributes and annotation code.

Third, HTML, JS, CSS code optimization

Backward-compatible ellipsis modes, such as code that defines a document type, can be used "! DOCTYPE HTML instead of the traditional declarative DTD, which is not only backwards compatible, but also saves you 150 characters without stint. In addition, div than the table layout page save code, so the choice of who, needless to say. You should also avoid using unnecessary annotations. For external sticky from word and other content, pay attention to the source code state to clear its redundant code, for the content is longer, should be reasonable pagination. Of course, you can also use tools such as Web page file compressors to clear HTML redundant code, but individuals still tend to manual removal. For JS, CSS should be used outside the call mode. Can learn from the practice of large sites, the code does not indent. In addition, when you call jquery and other library files, you should select a smaller file to meet the needs.

There is no uniformity in the size control of the page file, and I do not agree to limit it to a certain range. But you should follow the principle of minimizing, how small you can be. In addition, the author of the pursuit of web effects and add a lot of code is not agree with the practice. After all, enhancing the visual effect and reducing the loading speed of the Web page is obviously contradictory to improve the user experience. Finally, or that sentence, SEO needs us to grasp the details, the world will be done in fine. Article original, reproduced please indicate the source 788 China door and window curtain wall Talent network http://www.788job.net, 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.