📜 ⬆️ ⬇️

What are META tags and why are they needed?

META tags


In the continuation of the first post about DOCTYPE , I, as promised, will continue about META tags.
META tags are optional attributes placed in the page header that may contain its description, keywords to it, information about the author, control commands for the browser and search robots, and other proprietary information that is not intended for visitors.

META tags have two possible attributes.


- <META HTTP-EQUIV = "name" CONTENT = "content">
- <META NAME = "name" CONTENT = "content">
META tags should be in the header of an HTML document between <HEAD> and </ HEAD> (this is especially important for documents that use frames).

The HTML 4.01 standard does not specify the values ​​and names of meta tags, so we will consider those values ​​that are already established on the Internet and are used more often than others.

Pruflink: http://www.w3.org/TR/html401/struct/global.html#h-7.4.4.1
(It can be used to identify the normative set of properties.)


HTTP-EQUIV attribute


META tags with the HTTP-EQUIV attribute are equivalent to HTTP headers. Usually they control the actions of browsers and can be used to improve the information provided by the usual headers. Tags of this form can have the same effect as HTTP headers, and on some servers they can automatically be translated into real HTTP headers.
Some of the header fields generated by the server cannot be replaced with values ​​from META tags (in particular, Date), others are replaced only with an abnormal status code (<> 200). When the title is not clear, the value of the HTTP header prevails over the value of the META tags.
')

Values ​​of the content field for the HTTP-EQUIV Attribute


ValueDescriptionUsage exampleEffect
ExpiresDate of obsolescence. Control caching in HTTP / 1.0. If the specified date has passed, then the next request for this document causes a repeated network request, rather than loading the document from the cache. A date with a value of "0" is interpreted as "now." This value causes the browser to check every time it is asked whether the document has changed. This, incidentally, also applies to proxy agents.The date must be specified in the format described in RFC850,
<META HTTP-EQUIV = "expires" CONTENT = "Wed, 26 Feb 2008 08:21:57 GMT">
equivalent to the HTTP header
Expires: Wed, 26 Feb 2008 08:21:57 GMT
Search robots can either not index at all such a document, or constantly "sniff" it.
PragmaThis directive indicates that the cached information should not be used and, instead, requests should be sent to the server. This directive has the same meaning as CACHE-CONTROL: NO-CACHE and is provided for backward compatibility with HTTP / 1.0.

Clients should use both PRAGMA values: NO-CACHE and CACHE-CONTROL: NO-CACHE when you need to send a non-cacheable request to the server, which is unknown if it is compatible with HTTP / 1.1.
If the server is known to be compatible with
The HTTP / 1.1 client should NOT send a PRAGMA header.
The HTTP / 1.1 cache should understand "PRAGMA: NO-CACHE" just as if the client sent "CACHE-CONTROL: NO-CACHE".
<META HTTP-EQUIV = "PRAGMA" CONTENT = "NO-CACHE">
Content-TypeSpecify the type of document. It can be extended by specifying the page encoding (charset). If you specify the charset in the content of the META tag, then some browsers display this page already in the specified charset.<META HTTP-EQUIV = "Content-type" CONTENT = "text / html; charset = ISO-2022-JP">Use browsers and search engines
Content-languageSpecify the language of the document. Can be used by search engines when indexing pages. The combination of the Accept-Language field (sent by the browser) with the contents of the Content-language can be a condition for the server to choose a particular language.<META HTTP-EQUIV = "Content-language" CONTENT = "en-GB">
equivalent to the HTTP header
Language is described by a pair of values ​​(language-dialect). In the example: English-UK
For the Russian language - ru-RU
Used by some search engines
RefreshDetermining the delay in seconds after which the browser automatically updates the document. An additional feature is the automatic loading of another document.<META HTTP-EQUIV = "Refresh" Content = "3, URL = http: //www.name.com/page.html">
equivalent to the HTTP header
Refresh: 3; URL = http: //www.name.com/page.html
W3C does not recommend using this tag.
Google page with this tag ignores. Other search engines may too.
Cache-controlDefines the cache actions in relation to this document. Possible values:
Public - the document is cached in accessible to all caches.
Private - only in private cache
no-cache - cannot be cached
no-store - can be cached but not saved
<META http-equiv = "Cache-Control" content = "public">Used by some browsers.



NAME attribute



Robots
The <meta name = "Robots" content = "..."> tag controls the indexing of a specific web page. In this case, robots can prohibit not only the indexing of the document itself, but also the passage through the links contained in it.
Indexing instructions are written in the content field. The following instructions are possible:
NOINDEX - disables document indexing;
NOFOLLOW - prohibits the passage of the links in the document;
INDEX - allows document indexing;
FOLLOW - allows the passage of links.
ALL - equivalent to INDEX, FOLLOW
NONE - equivalent to NOINDEX, NFOLLOW
The default value is <meta name = "Robots" content = "INDEX, FOLLOW">.
In the following example, the robot can index the document, but should not select links from it to search for further documents:
<META name = "ROBOTS" content = "index, nofollow">
Tag name, field names and values ​​are case insensitive.
In the content field, duplication of instructions, the presence of conflicting instructions, etc. not allowed; in particular, the value of the content field cannot have the form "none, nofollow".
Google supports the additional value NOARCHIVE, which prohibits to place the page in a google archive
<META NAME = "Robots" CONTENT = "NOINDEX, FOLLOW">Used by most search engines
DescriptionThe value of the CONTENT attribute is a string that defines the text description (brief annotation) of a specific page of your site. You should not create too long and detailed description of your site in this tag, it is recommended to limit the text to 100 characters, because the search engines, in most cases, have a limit on the number of characters to be indexed. This tag can greatly help in cases when there is little text in the document, when it is a frame-managing file (frameset) or at the beginning of the document scripts are used.<META NAME = "description" CONTENT = "This site contains information for lovers of vintage cars, on it you can find a description with photos of rare and exclusive cars">The most widely used tag. Almost all search engines take it into account when indexing.
The value of this tag is very important for the promotion of the site, almost all search engines rely on this
tag, and some display the contents of this tag in search results (Google), so it’s advisable not just to provide a short description of the document, but to make its content an attractive advertising message.
KeywordsThe value of the CONTENT attribute is a list of keywords, usually comma-separated, corresponding to the content of your site. These are the words in the query for which you would like your website to appear in the list of search results. It is also recommended to limit the list to 30 words. You can put the most frequent typos keywords. You can also write here English words corresponding to the content of your site. Well, what specific words you need to write - this is the topic of a separate article. Some search engines do not index sites that repeat the same word in a given tag to increase its position in the list of results.<META NAME = "keywords" CONTENT = "advertising, design, printing">It is taken into account by most search engines. It is precisely known that does not consider Google and Rambler
document-stateManage page indexing for search robots. Determines the indexing frequency — either index once (Static value), or re-index the document regularly (Dynamic value).<META NAME = "Document-state" CONTENT = "Static">Rarely used
GOOGLEBOTGoogle supports a special Googlebot tag with which you can tell Google that it should not index and archive your page, other search engines will ignore this tag.<META NAME = "GOOGLEBOT" CONTENT = "NOARCHIVE">
AuthorAuthor, creator of the site. It is unlikely to be used by search engines, and most likely is needed so that it can be shown that the site is made specifically by a particular person or company.<META NAME = "AUTHOR" CONTENT = "www.neo-systems.ru">
RevisitThe value of this tag indicates how often the information on your site is updated, and how often the search engine should go to it to see the updates. Due to the prevailing conditions, search engines now independently determine the frequency of scanning a site, so perhaps the presence of this tag will not give you anything.<meta name = "revisit-after" content = "15 days">



Information sources:


http://www.citforum.ru/internet/search/metatags.shtml
http://web-support.ru/adv/ps_meta_2.shtml
http://www.shtogrin.com/library/web/meta/
http://vancouver-webpages.com/META/metatags.detail.html
http://www.mattcutts.com/blog/keywords-meta-tag-in-web-search/
http://www.webotdel.ru/notes/metatags/
Http://www.w3schools.com/tags/tag_meta.asp
What meta tags Google understands http://www.google.com/support/webmasters/bin/answer.py?answer=79812
What meta tags Bing understands
http://www.bing.com/community/blogs/webmaster/archive/2009/07/18/head-s-up-on-lt-head-gt-tag-optimization-sem-101.aspx
Google does not use the meta tag keywords
http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html

Source: https://habr.com/ru/post/72141/


All Articles