Many times, the purpose of website diagnosis is that we have encountered a series of problems in website optimization. Because SEO is a comprehensive task, we need to understand a lot of SEO technical details, but also need to make unremitting efforts. Therefore
Many times, the purpose of website diagnosis is that we have encountered a series of problems in website optimization. Because SEO is a comprehensive task, we need to understand a lot of SEO technical details, but also need to make unremitting efforts. Therefore, when an exception occurs, we need to perform comprehensive diagnosis and analysis on the internal and external websites. Website internal diagnosis is inseparable from website code diagnosis. 37. let's talk about the code diagnosis problem and see what code problems exist on our website:
The first is the layout problem. see the figure below. SEO or webmasters who have a better understanding of the code know that this layout is table layout, and many of us know that div + css layout is far better than table layout in website optimization. Because the div and css code are stored separately, the structure is clear, the download speed is fast, and the modification is also conducive to website optimization. Although table layout has good compatibility, it can avoid layout collapse, but in the user's opinion, it increases the page browsing speed and opens slowly, and also increases the difficulty for the search engine to analyze the page content.
Code location issues. Display, we can see that a large number of css code and javascript code are directly written into html. as mentioned above, the separation of div and css code facilitates optimization, because most of the HTML code and styles are written into the CSS file, the text section in the webpage becomes more prominent, which is easy to be collected and indexed by search engines. But writing directly to html is obviously not a good method.
If there is a large amount of css and js code, you should consider writing them into external files (such as files with css suffixes and files with js suffixes ), then, call the css code file or js code file through an external link. here, the 37 network is used as an example to illustrate the detailed call method as follows:
And put them in the html file.
Useless images and flash. The useless pictures and flash here include not only the error pictures and flash in html, but also the pictures and flash code that are not conducive to and do not comply with SEO, such, the image here may be decorative, but for SEO, it does not comply with the website optimization specifications. Many websites have such problems. Using a large number of pictures, icons, and flash to decorate pages is so dazzling that the core content of the website is weakened.
A large number of JavaScript calls
In fact, a lot of JS code is the same as a lot of css code, 37 network is recommended to all use external call file encapsulation. A large amount of JavaScript can easily lead to search engine Crawling difficulties, because the current technology, spider does not recognize JS code, but will affect the website experience. Like this, this website uses a lot of js special effects and effects, and even worse, it is directly written into html, which leads to a particularly bloated website code.
Spam code problems. This is an essential part of code optimization. The emergence of spam code is not familiar with the code on the one hand, the editor and automatic generation on the other, and is often related to bad operation habits, such as a large number of redundant code, the redundant style is basically invalid. here, the spam code may be directly pasted from other websites or word, so you must learn to perform standard operations, learn to reduce unnecessary code in the website.
The code problems that are not conducive to website optimization are not only these issues, but also some other problems. 37. the network believes that concise code should be used for site building and optimization and maintenance. Although the code diagnosis is complicated and troublesome, when we conduct website diagnosis, this cannot be ignored. On the one hand, we must ensure the correctness of the code, and on the other hand, pay attention to the code standardization. Because we should not only look at the search engine, but also show it to users. although you argue that users do not read the code, incorrect code may cause website functions or security problems, non-standard code may cause browsing exceptions, incompatibility, layout disorder, and other user experience problems. can you turn a blind eye to these questions about website code?