A good website structure can be better to get the favor of search engines, many seoer will change the structure of the site to a tree-like form, that this is a good site structure or to do the optimization of the structure of the site, in fact, code specifications are also part of the site structure optimization category. However, code optimization is often seoer mercilessly ignored or lost. Talk about your own ideas about code optimization here Zhang Jianfei.
One, reduce the code
The smaller the page size, the faster the access rate, which is well known, and also the same for search engines. The faster the visit, then the search engine will often come, of course, it is necessary to have something to feed the spider site. So what should we do to optimize the code?
First, the code should have a clear classification of the separation Code, the benefit of this two points: 1th, reduce the Web page access when the HTTP request, 2nd, easy to maintain the site.
The second is to discard the table to choose Div+css, why do this? Because the table user experience, slow access, is not conducive to maintenance and difficult to pass through the validator authentication. On the contrary, Div+css is a good solution to these problems. You can test the same number of lines of code or the same effect with table and DIV+CSS respectively, look at the speed of both access.
Second, code format, hierarchical structure
Code like that, can also toss out a pattern, not just HTML tags, you may say. It's true that Web pages are eventually turned into HTML tags, but HTML tags need a hierarchy to standardize. Take the META tag, many of the site's several meta tag order are different, do not say anything else, said the webmaster want to see the information, each page to see the time, the order is not the same, is not it will see the eye? So HTML tags also need to be standardized, the following is a more typical HTML tag structure hierarchy code:
You can see from the above code specifications, clear, is not much better than code confusion. The above code takes the CSS stylesheet code as an external call, reducing the HTTP request and increasing the load speed of the Web page. Is this the best way to deal with this? The answer is: No. Do not find this to do a lot of blank space, add a lot of useless things out of thin air, increase the volume of the page. So what do we do, there are tools that can take these free characters out of the code-intensive Web page (remember to use before, save a copy, as we maintain the time to use).
Summary: SEO needs careful analysis, try to figure out every detail, the details determine success or failure. Tip: Preferably in the development of web templates or programs, do these early work, avoid many changes. This article by Zhang Jianfei (www.semanswer.net) original, reprint please signature, respect original!