A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service
What is a meta tag?
The META tag is a key tag in the head area of the HTML tag, which is located between the
Note: Meta information is information about information that allows the server to provide information about the data being sent, such as HTTP to improve the object language and object being sent, or to use meta information to achieve conditional requests and report transaction completion. The browser that receives the data can determine what the server is sending based on meta-information, what data is expected, whether it is receiving the complete data, and whether there is an error in the process so that the customer can know the type of the transmitted object.
What are the attributes of the META tag?
Equivalent to the file header of HTTP, it can send back some useful information to the browser to help the browser to display the content of the page correctly.
Syntax: <meta http-equiv= "parameter" content= "parameter Value" >
1) Content-type (set the character set used by the page)
<metahttp-equiv= "Content-type" content= "text/html;charset=gb2312" >
Http-equiv=content-type represents the HTTP header protocol, prompting the browser Web page for information,
Meta tag of charset information parameters such as GB2312, the representative of the website is the use of the code is Simplified Chinese;
Meta tag charset information parameters such as BIG5, the representative of the website is the use of the encoding is traditional Chinese;
Meta tag of the charset information parameters such as ISO-2022-JP, the representative of the website is to use the encoding is in Japanese;
Meta tag of the charset information parameters such as ks_c_5601, the representative of the website is to use the encoding is Korean;
Meta tag charset information parameters such as Iso-8859-1, the representative of the website is the use of the code is in English;
Meta tags of the charset information parameters such as UTF-8, representing the world's universal language coding;
2) Content-language (display language Settings)
<meta http-equiv= "Content-language" content= "ZH-CN"/>
3) Expires (term, can be used to set the expiry time of the page. Once the page expires, it must be retransmitted to the server)
<meta http-equiv= "Expires" content= "FRI,12JAN200118:18:18GMT" >
Note: The time format of GMT must be used.
4) Pragma (cache mode, prevents the browser from accessing the page content from the local computer's cache)
<meta http-equiv= "Pragma" content= "No-cache" >
Note: This setting makes it impossible for visitors to browse offline.
5) Cache-control (Cache settings)
<meta http-equiv= "Cache-control" content= "No-cache" >
The cache directives for the request include No-cache, No-store, Max-age, Max-stale, Min-fresh, only-if-cached, and the instructions in the response message include public, private, No-cache, No-store, No-transform, Must-revalidate, Proxy-revalidate, Max-age. The instructions in each message have the following meanings:
Public indicates that the response can be cached by any buffer
Private indicates that the entire or partial response message for a single user cannot be shared with the cache. This allows the server to simply describe a partial response message for the user, which is not valid for another user's request
No-cache indicates that a request or response message cannot be cached
No-store is used to prevent the inadvertent release of important information. Sending in the request message will make the request and response messages do not use the cache.
Max-age indicates that the client can receive a response that is not longer than the specified time (in seconds)
Min-fresh indicates that the client can receive response times that are less than the current time plus a specified time
Max-stale indicates that the client can receive a response message that exceeds the timeout period. If you specify a value for the Max-stale message, the client can receive a response message that exceeds the specified value for the timeout period.
6) Refresh (auto refresh and point to New page)
<meta http-equiv= "Refresh" content= "2; Url=http://www.baidu.com ">//(Note the following quotes, respectively, before the number of seconds and after the URL)
Note: 2 of these are meant to be automatically refreshed to URL URLs after 2 seconds of stay.
7) Window-target (Force the page to be displayed on a separate page in the current window)
<meta http-equiv= "Window-target" content= "_top" >
Note: Used to prevent others from calling their own pages in the frame.
8) Set-cookie (cookie settings, if the page expires, then the cookie will be deleted)
<meta http-equiv= "Set-cookie" content= "Cookie value=xxx; expires=friday,12-jan-200118:18:18gmt;path=/">
Usually forcing the browser to not set the cache back from the server gets the page using the following method:
<meta http-equiv= "Pragma" content= "No-cache" ><meta http-equiv= "Cache-control" content= "No-cache" >< Meta http-equiv= "Expires" content= "0″>
The name attribute is mainly used to describe the Web page, and its corresponding property value is content,content content is mainly convenient for search engine robot to find information and classification information.
<meta name= "parameter" content= "specific parameter value" >
Description: Keywords is used to tell search engines what keywords are on your page.
<meta name= "keywords" content= "" >
Description (Website content description)
Description: Description is used to tell search engines the main content of your website.
<metaname= "description" content= "" >
Robots (Robot Wizard)
Description: Meta Robots tags manage whether a search engine can access a Web page, and you can use it to allow or disallow search engines to access your pages, to access sub-links in your Web pages, or to archive your pages. The content parameters are all,none,index,noindex,follow,nofollow. The default is all.
<metaname= "Robots" content= "None" >
The specific parameters are as follows:
The information parameter is all: The file will be retrieved and the link on the page can be queried;
The information parameter is none: The file will not be retrieved, and the link on the page can not be queried;
The information parameter is index: The file will be retrieved;
The information parameter is follow: the link on the page can be queried;
The information parameter is NOINDEX: The file will not be retrieved, but the link on the page can be queried;
The information parameter is nofollow: The file will be retrieved, but the link on the page can not be queried;
Description: The author of the callout page
<metaname= "Author" content= "firstname.lastname@example.org" >
Description: Meta tag of the generator information parameter, which represents the use of the website to describe what software is being produced.
<metaname= "Generator" content= "Information parameters"/>
Description: Meta tag of the copyright information parameter, which represents the website copyrights information.
<metaname= "Copyright" content= "Information parameters" >
Description: Revisit-after on behalf of the site re-visit, 7days for 7 days, and so on, if I set, then the search engine is 7 days to come. The use of this label site, usually because the website data volume is very large, by the search engine too often crawl, will occupy too large resources, affecting the site's access. Therefore, hope that the search engine does not come every day, crawl once, then wait 7 days to come again. This tag is not required for a general website.
<meta name= "Revisit-after" content= "7days" >
Description: Major impact on mobile page layout
<meta name= "viewport" content= "Width=device-width, initial-scale=1.0" >
Width viewport widths (numeric/device-width)
Height viewport altitude (numeric/device-height)
Initial-scale Initial zoom ratio
Maximum-scale Maximum zoom ratio
Minimum-scale Minimum zoom ratio
User-scalable whether to allow user scaling (yes/no)
The content property is generally used in conjunction with the name and Http-equiv properties, depending on their value.
The CharSet property, which is the HTML5 property, can be substituted <metahttp-equiv= "Content-type" content= "text/html;charset=gb2312" > Set to <meta charset= "Utf-8" >
What is the purpose of setting the meta attribute?
The META tag provides metadata about the HTML document. The metadata is not displayed on the page, but is readable for the machine. It can be used in browsers (how to display content or reload pages), search engines (keywords), or other Web services. Meta tags are available for cache settings and are also related to SEO optimization. SEO refers to the use of Easy search engine index of reasonable means, so that the basic elements of the site for search engine retrieval principles and more user-friendly (search engine friendly), which is more easily indexed by the search engine and prioritization from the SEM (search engine marketing). Popular understanding is: by summarizing the ranking rules of search engines, to optimize the site, so that your site in Baidu and GOOG rankings improve, so that the search engine to bring you customers.
SEO optimization commonly used statements are as follows
<!--page title <title> label (head head must)--><title>your title</ title><!--page Keywords keywords--><meta name= "keywords" content= "your keywords" ><!--page Description Content Description-- ><meta name= "description" content= "Your description" ><!--Definition page author author--><meta name= "Author" content= "Author,email Address" ><!--define a web search engine index, robotterms is a set of values that use commas and splits, usually with the following values: None,noindex, Nofollow,all,index and follow. --><meta name= "Robots" content= "Index,follow";
Start building with 50+ products and up to 12 months usage for Elastic Compute Service