The Http-equiv attribute usage in the META tag is described in

Source: Internet
Author: User

Meta is an auxiliary tag in the head area of the HTML language; Meta tags are used for: Search engine Optimization (SEO), define the language of the page, etc.

Meta is an accessible tag in the head area of the HTML language. Maybe you think the code is dispensable. In fact, if you can use a good meta tag, it will bring you unexpected results,

Meta tags for the role of: Search engine Optimization (SEO), define the language of the page, automatically refresh and point to the new page, to achieve the dynamic effect of Web page conversion, control page buffering, page rating evaluation, Control page Display window and so on!

composition of META tags: Meta tags have two properties, which are the Http-equiv property and the Name property, and different attributes have different parameter values, and these different parameter values implement different page functions.

1. Name property

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.

The syntax format for the META tag's Name property is:

<metaname= "parameter" content= "specific parameter value" >.

Where the name attribute mainly has the following parameters:

A, Keywords (keywords)

Description: Keywords is used to tell search engines what keywords are on your page.

Example: <metaname= "keywords" content= "science,education,culture,politics,ecnomics,relationships,entertaiment, Human ">

B, description (Website content description)

Description: Description is used to tell search engines the main content of your website.

Example: <metaname= "description" content= "Thispageisaboutthemeaningofscience,education,culture." >

C, Robots (Robot Wizard)

Description: Robots is used to tell the search robot which pages need to be indexed and which pages do not.

The content parameters are all,none,index,noindex,follow,nofollow. The default is all.

Example: <metaname= "Robots" content= "None" >

D, author (author)

Description: The author of the callout page

Example: <metaname= "author" content= "Root,[email protected]" >

2. HTTP-EQUIV Properties

Http-equiv, as the name implies, is equivalent to the HTTP file header function, it can send back some useful information to the browser to help correct and accurate display of the content of the Web page, and the corresponding property value of content,content content is actually the variable value of each parameter.

The Http-equiv property syntax format for meta tags is:

<metahttp-equiv= "parameter" content= "parameter variable value" >;

Where the Http-equiv property mainly has the following kinds of parameters:

A, Expires (term)

Description: Can be used to set the expiration time of a Web page. Once the page expires, it must be retransmitted to the server.

Usage: <metahttp-equiv= "expires" content= "FRI,12JAN200118:18:18GMT" >

Note: The time format of GMT must be used.

B, Pragma (cache mode)

Description: Prevents the browser from accessing page content from the local computer's cache.

Usage: <metahttp-equiv= "Pragma" content= "No-cache" >

Note: This setting makes it impossible for visitors to browse offline.

C, refresh (refreshed)

Description: Automatically refreshes and points to the new page.

Usage: <metahttp-equiv= "Refresh" content= "2; Url=http://www.jb51.net "> (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.

D, Set-cookie (Cookie setting)

Note: If the page expires, the cookie will be deleted.

Usage: <metahttp-equiv= "Set-cookie" content= "cookievalue=xxx;expires=friday,12-jan-200118:18:18gmt;path=/" >

Note: The time format of GMT must be used.

E, Window-target (display window settings)

Description: Forces the page to appear on a separate page in the current window.

Usage: <metahttp-equiv= "window-target" content= "_top" >

Note: Used to prevent others from calling their own pages in the frame.

F, Content-type (setting of the display character set)

Description: Sets the character set used by the page.

Usage: <metahttp-equiv= "content-type" content= "text/html;charset=gb2312" >

G, Content-language (Display language Settings)

Usage: <metahttp-equiv= "content-language" content= "ZH-CN"/>

H, Cache-control Specifies the caching mechanism that requests and responses follow.
CACHE-CONTROL Specifies the caching mechanism that requests and responses follow. Setting Cache-control in a request message or response message does not modify the caching process in another message processing process. Cache instructions on request include No-cache, No-store, Max-age, Max-stale, Min-fresh, on

Ly-if-cached, the directives 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.

tips for using meta tags

Meta tags are used to describe the properties of a Web page in a language, the standard meta tags can facilitate search engine ranking, improve search engine site weight rankings.

To the site to do more in line with the search engine standards must understand the META tag, the following from Seoer to tell you about the meaning of meta-tags and how to use:

1. Meta tag keywords

The wording is: <metaname= "Keywords" content= "Information parameters"/>

Meat the Keywords information parameter of the label, which represents the keyword of the website.

2. Meta tag description

<metaname= "Description" content= "Information parameters"/>

Meta tags are description information parameters that represent the main content of the website and what the profile is.

3. Meta tag http-equiv=content-typecontent= "text/html

Http-equiv=content-type represents the HTTP header protocol, prompting the browser Web page for information,

<metahttp-equiv= "Content-type" content= "text/html;charset= Information parameters"/>

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;

4. Meta tag Generator

<metaname= "Generator" content= "Information parameters"/>

Meta tag of the generator information parameter, which represents the description of what the website uses for software production.

5. Meta Tag author

<metaname= "Author" content= "Information parameters" >

Meta tag of the author information parameter, which represents the website copyright author information.

6. Meta tag http-equiv= "Refresh"

<metahttp-equiv= "Refresh" content= "time; Url= URL Parameters ">

The refresh of the meta tag represents how much time the page is automatically refreshed, plus the URL parameters in the URLs represent how long it takes to automatically link to other URLs.

7. Meta tag http-equiv= "Pragma" content= "No-cache"

<metahttp-equiv= "Pragma" content= "No-cache" > representative prohibits browsers from accessing page content from the local computer's cache, so that visitors will not be able to browse offline.

8. The copyright of META tags

<metaname= "COPYRIGHT" content= "Information parameters" >

Meta tag of the copyright information parameters, representative of the website information.

9. Meta tag http-equiv= "Imagetoolbar"

<metahttp-equiv= "Imagetoolbar" content= "false"/>

Specifies whether the Picture toolbar is displayed when the false representation is not displayed, and when True represents the display.

10. Meta Tag Content-script-type

<metahttp-equiv= "Content-script-type" content= "Text/javascript" >

Web page specification that indicates the type of script in the page.

11. Meta Tag Revisit-after

<metaname= "Revisit-after" content= "7days" >

Revisit-after on behalf of the site re-visit, 7days for 7 days, and so on.

12. Meta tag robots<metaname= "Robots" contect= "Information parameters" >

Robots representative tells the search engine what pages the robot crawls

the properties are described below

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;

The Http-equiv attribute usage in the META tag is described in

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.