Six directions to let your site page slim

Source: Internet
Author: User
Keywords With

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

As the search engine pays more and more attention to the user's friendly experience degree, the page redundancy code which affects the loading speed of the site is also one of the problems that can not be neglected. How to thin the body for the bloated page is also placed in front of every webmaster one of the required courses. The following author on how to streamline the page code for the site to share six points of experience.

Direction one: Clear more than the space Code on the page

  

As shown in the figure above, many web designers may be using a lot of space code when designing pages because of the different code writing habits. The size of the space code is small, but it adds up, and a large number of space code pages can make our code abnormally bloated. And if we know these unnecessary space code, will be for our site to streamline the page.

Two: Use div layout Web page

  

Although the div is now very mature, many web designers may consider the compatibility of the page and the simplicity of the layout, or use the old-fashioned table layout, as shown in the above illustration. Although table layout is convenient, but its drawbacks are also obvious, that is, it will greatly increase the size of the page, especially the nesting of multi-layer tables. This layout will not only enhance the volume, at the same time if too many nested arrays will affect the search engine crawling, affecting the site included.

Third: Reduce the page for JS dependence

Reduce the Web page to JS dependence. JS to search engine can say very unfriendly. Although JS can produce a lot of results, but the page of a large number of JS will affect the spider on the page crawl and increase the volume of pages. Especially the key position of the page such as navigation bar, use div design method as far as possible.

Four: Try not to use inline CSS

Inline CSS is divided into two types, one is in the head area of the general inline, the second is in the label inside inline CSS, no matter what embedded CSS way results will enhance the volume of the page. For this we can use the outward-style CSS as far as possible for the size of the site page slimming.

Five: Convert HTML control mode to CSS control

Many web designers are accustomed to controlling content within tags. For example, the IMG tag controls the size of the picture by width and height. Try to convert these code to the outward-style CSS, so that the page code more thin body.

Six: gzip compression for Web pages

This may be familiar to everyone. This feature requires support from your server. Gzip compression is generally able to 30%-80% the Web page compression, is the most important one optimization effect.

The above six points is the author for the site of the new thin body, we can go to practice, the author of the site page has more than 80 k, in this six direction after the simplification of the page after the code only more than 20 K, can say that the effect is significant, I hope to help you. Article by the System House http://www.haoxp123.com edit, reprint please keep the source.

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.