A
A
Anton2018-02-01 16:49:39
Search Engine Optimization
Anton, 2018-02-01 16:49:39

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

7 answer(s)
P
Puma Thailand, 2018-02-01
@opium

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

D
Dmitry Dart, 2018-02-01
@gobananas

Programmer - comments on code, not deletes it

Code in HTML? Or on the server side in PHP? If the first is yes, it is better to remove it for the same download speed, if the second is not important at all, it does not reach the user.
here the programmer is right, the code should be left in the style tag in the header

S
SagePtr, 2018-02-01
@SagePtr

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,

M
Maxim Timofeev, 2018-02-01
@webinar

Programmer - comments on code, not deletes it

Where? This is the cornerstone. Only clean code should go to production. But if this is a dev part of the project, then let them comment. If this is not minified js or php in general, then thanks to him should be said for the comments. As I understand it, someone or all the participants in the dispute have not heard anything about gulp, and this would solve the problem.
It depends on how many there are and whether they are reused. Here you need to look at a specific example. Making a separate file for 10 lines of code and for the sake of it making a separate request to the server is also bad.
here I would break it into two parts
- unused code should be deleted - as if it goes without saying
- the code should be as short as possible in the body of the page - why all of a sudden?

I
InoMono, 2018-02-01
@InoMono

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.

Z
zooks, 2018-02-01
@zooks

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>

P
palec2009, 2018-02-11
@palec2009

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 question

Ask a Question

731 491 924 answers to any question