Details of the site code optimization needs attention

Source: Internet
Author: User

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

Usually seoer in the process of doing site optimization is more concerned with the article and the chain optimization, and most people ignore the site code optimization. In fact, reasonable code optimization can not only increase search engine friendliness, but also enhance the user experience, SEO work can play a very good role in promoting. Today, the author based on their previous experience to do the station, and you share the site code optimization in some areas needing attention.

1, CSS Optimization

Today most sites are in the form of Div, but many templates are external calls to CSS, and style sheet class name will have a lot of repeatability. Especially for the imitation template, the class name will basically not change, which creates a large number of code duplication is higher than the site, which is detrimental to the optimization work. Every time I do a new station, the template code in the class name will be modified, the corresponding CSS file name also to be modified, this form a unique site code.

There is a point, CSS inside the use of the style sheet must be deleted, but also to the CSS file as much as possible to compress, which is conducive to Web page loading speed. Another point is that the same Web page is best to call only a CSS stylesheet, which can reduce the code to increase search engine friendliness or have some effect. If it's a generic template, there's usually more than one CSS file that you can manually merge, and don't forget to delete redundant and repetitive content.

2, JS optimization

Web site JavaScript and other files best external call, do not put the JS code in the Web page, and need to minimize the number of script files, this is not only conducive to Web page loading speed, but also conducive to search engine spiders crawl. Usually the author is a Web page used to merge the JS file into one, and then put the final call to the HTML code, personally think better than on the head part.

3, navigation optimization

Generally speaking, the site's navigation is the whole station general, the role of navigation is also critical, recommended that you try to use text navigation, it is best not to use pictures and flash, etc., if you must use the picture must also be added ALT attribute. and flash try to avoid, although the visual effect of Flash is very good, but the load is too slow, search engines can not read Flash files, so easy to leave a bad impression on spiders.

4, HR label optimization

H1-h6 tag is a lot of webmaster friends like to use the label, with good indeed to SEO work Kai to a certain degree of promotion, but the use of a bad but it is easy to lose the candle. Usually H1 is mainly used to decorate the main title of the page, and H2 is the title of a paragraph, H3 is the section of the paragraph title, the general search engine can not think of a visitor as direct recognition of which is the title, so use the HR tag can guide search engine title where, let them quickly grasp the general text. So we do optimization time, can be appropriate to join us to do the keyword, but need to pay attention to, appropriate use on it, must not be abused.

5. Picture optimization

Many novice webmaster Use the image of the time will be called directly, but easy to ignore some can do better details, such as the picture plus ALT tag, indicating the picture width and height and so on. In fact, search engine spiders and people are not the same, in order to increase the friendliness of search engines, it is necessary to make spiders crawl your Web page more easily. Usually I do a station, will be all used to compress the picture, so that the page will open faster, at the same time I will be the name of all the pictures in accordance with their own ideas to modify, until the confirmation and other site pictures do not repeat.

The above to share some of the site code optimization experience, hope that the vast number of webmaster friends can have some inspiration. SEO optimization work is a combination of many factors, every point can play a great role, so you must not ignore some often can see the details. At the same time need to pay attention to, spiders like simple to read the code, and do not like onerous or read code. This article by Anhui Gourmet http://www.ahbbz.com/Original, and in the A5 webmaster net starting, reproduced please indicate the link and provenance, 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.