Answer the question
In order to leave comments, you need to log in
Who is the right SEO specialist or programmer in the dispute?
Here they were puzzled by the question to the chief.
Programmer - comments on the code, and does not delete it in order to look for bugs in the future. In addition, it uses styles in the body of the page, and does not take it out into a separate css file for individual pages, according to the recommendations of Google speedtest.
Seoshnik says that the code should be as short as possible in the body of the page and all unused code should be deleted, and the styles should be moved into one common style file.
What do you think - which is better and how is it allowed?
Answer the question
In order to leave comments, you need to log in
If he comments something in html, then he is an asshole.
Regarding the styles in the page, there is a standard recommendation that there should be much less garbage content, if the proger drags everything into the page itself, then he is also an asshole, since this reduces the site loading speed
Programmer - comments on code, not deletes it
Usually, the code does not go into production in the form in which the programmer writes it, but is assembled using some build system (webpack, gulp, etc.), where it is assembled from many files into one, transpiled into a more supported language (js, css) is minified. As a result, of course, all comments and unused code branches are deleted. This compressed version is used on the site, and in development the source code is used, from which nothing is removed by hand,
Programmer - comments on code, not deletes it
Easy to automatically clean up comments.
Though in a web server before return to the client.
At least before when uploading to the server.
And CSS - yes, should be separate.
1. If it comments out small sections of HTML that may be needed in the future, then this is normal.
2. Throwing CSS in the body of the page is not good. Except for styles that come in one block . This is required for PageSpeed.
3. There are few professional SEOs, they regard search engines as a deity and are afraid to sneeze once again, dancing with a tambourine, although their behavior is 99% logical. We need a high page loading speed, preferably code validity and semantic layout. For example, it's good to check that Gzip compression is configured, rather than saving every byte. <style></style>
You can close the commented sections with noindex tags so that the search engine does not see this and the whole problem is solved, but at the expense of speed, it is unlikely that he comments on the code in thousands of lines, an extra hundred lines of just text will not make the weather in terms of speed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question