Meta tag usage Instructions (http-equiv, refresh, seo)

Source: Internet
Author: User
Tags set cookie

Meta tag usage Instructions (http-equiv, refresh, seo)

Meta tags, in the head tag, are generally used as page Descriptions. Its content, used to describe the page some information, such as type, encoding, author, introduction and so on! Although it is not displayed as a page layout, it is actually very versatile! Specific HTML definitions in: meta definitions

Meta component

Meta tags have a total of two properties, which are the Http-equiv property and the name property, and different properties have different parameter values, these different parameter values to achieve a different page Function.

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.

HTTP-EQUIV is equivalent to the file header of http, it can send back some useful information to the browser to help correct and accurately display the content of the Web page, the corresponding property value of Content,content is actually the variable value of each parameter.

Meta Tag Properties

Properties value Description
Http-equiv Content-type
Content-language
Pragma
Expires
Refresh
Set-cookie
Associate the Content property to the HTTP header. HTTP protocol return header, both support!
Name Author
Description
Keywords
Generator
Revised
Others
Associating the content property to the value of a specific property
Content Corresponding (name,http_equiv) Select the value of the property Defines the meta information associated with the HTTP-EQUIV or name Property.

HTTP-EQUIV Response return Head control

Commonly used to describe page types, encodings, redirects, and cache control aspects!

1, Content-type and Content-language (setting of the display character Set)

<meta http-equiv=″content-type″content=″text/html; charset=gb2312″>, the current page is text/html type, page encoding is gb2312, can also be abbreviated to <meta charset= "gb2312", language control: <meta http-equiv= " Content-language "content=" ZH-CN "/>, which explains this page is Simplified Chinese

2. Refresh automatically refreshes and points to the new page

<meta http-equiv=″refresh″content=″2; After url=http://blog.chacuo.net″>,2 seconds, the page automatically enters http://blog.chacuo.net

3, Expires (expiration Control)

<meta http-equiv= "expires" content= "fri,12 Jan 2001 18:18:18 GMT", which can be used to set the expiration time of the Web Page. Once the page expires, the local cache will expire and the information must be read back from the server!

4. Pragma (control Cache Mode)

Prevents the browser from accessing the page content from the local computer's cache, <meta http-equiv= "Pragma" content= "no-cache" >. Local browser does not save content! Disable caching can be added: <meta http-equiv= "cache-control" content= "no-cache" >, so together control!

5, Set-cookie (set Cookie Value)

Usage: <meta http-equiv= "set-cookie" content= "kkk=ddd; expires=thu, 11-jul-23 11:32:15 GMT; path=/; > Set the cookie, the name is kkk, the value is ddd, the expiration is 2023-7-11 19:32:15 seconds!

Help homepage by the major search engine login, other

1, Keywords description page keywords

<meta name= "Keywords" content= "politics, economics, Science and technology, culture, health, emotion, mind, entertainment, life, society, business, transportation" >, Easy Search engine, Quick Positioning page theme!

 

2, description page description information

<meta name= "description" content= "Cheng Blog is a focus on web security, performance, framework, and server performance, Server architecture, Server security, is a worthy web development friends Collection Blog. "/>, Simple description of the page summary!"

 

3, Author page owner

<meta name= "author" content= "chengmo" > The page author: chengmo

 < /p>

4, Copyright Description

<meta name= "copyright" content= "&copy; chacuo.net" > Copyright Information description!

 

5, date start time

<meta name= "Date" content= "2013-7-11t19:49:37+00:00" > page creation time!

 

6, 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: <meta name= "robots" content= "none" > does not index the page, and all connections within the page do not search the index!

 

The above is a Meta-common application, you can describe the page information, you can also guide the search engine! In particular, its properties and values are not further defined. As we continue to apply it, it is possible that we will extend the new properties later, as well as its corresponding values! It reserves a lot of space for future expansion! There are also browsers that Support: enter, exit animation, window definition, hierarchical Definition. But it can't be compatible in all browsers, not one at a time! Welcome to the Exchange!

Eta http-equiv attribute detailed (go) Blog Category:
    • Web synthesis
HTML browser Iecache search engine http-equiv as the name implies, the equivalent of 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 page, with the corresponding property values for content, Content is actually the variable value of each parameter.
The Http-equiv property syntax format for referencing the meat tag is: <meta http-equiv= "parameter" content= "parameter variable value", where the Http-equiv attribute mainly has the following parameters:

1. 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: HTML code
    1. http-equiv="expires" content="Wed, June 22:33:00 GMT" >

Note: the time format of GMT must be Used.

2. Pragma (cache mode)
Note: is used to set the browser from the local computer cache to access the content of the page, once left the page can not be recalled from the cache
Usage: HTML code
    1. http-equiv="Pragma" content="no-cache" >

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

3, Refresh (refreshed)
Description: automatically refreshes and points to the new Page.
Usage: HTML code
    1. http-equiv="Refresh" content="2;url=http://www.net.cn/" >

Note: 2 of these are meant to be automatically refreshed to URL URLs after 2 seconds of Stay.

4. Set-cookie (Cookie Setting)

note: if the page expires, the cookie will be Deleted.
Usage: HTML code
    1. http-equiv="set-cookie" content= "cookievalue=xxx;expires=wednesday, 20-jun-2007 22:33:00 GMT; path=/">

Note: the time format of GMT must be Used.

5, window-target (display window Settings)
Description: forces the page to appear on a separate page in the current WINDOW.
Usage: HTML code
    1. http-equiv="window-target" content="_top" >

Note: used to prevent others from calling their own pages in the Frame.

6, content-type (display Character Set Settings)
Description: sets the character set used by the Page.
Usage: HTML code
    1. http-equiv="content-type" content= "text/html; charset=gb2312 ">


7, Pics-label (web level Evaluation)
Usage: HTML code
    1. <Meta http-equiv= "pics-label" contect= "">

Description: There is a content setting in Internet Options for IE that prevents you from browsing some restricted sites, and the limit level for websites is set by the meta Attribute.

8, page_enter, page_exit
Set special effects HTML code when entering a page
    1. <Meta http-equiv="page-enter" contect="revealtrans (duration=1.0,transtion=)">

Set special effects HTML code when leaving a page
    1. <Meta http-equiv="page-exit" contect="revealtrans (duration=1.0,transtion=)">


The value of duration is the time, in seconds, that the page dynamically Transitions.
Transition is the transition mode, which has a value of 0 to 23, corresponding to 24 transition modes Respectively. As the following table:
0 box-shaped contraction 1 box-shaped radiation
2 round contraction 3 round emission
4 from bottom to top 5 up down
6 from left to right 7 right to left
8 Vertical Blinds 9 Horizontal Blinds
10 Horizontal Lattice Blinds 11 Vertical lattice Blinds
12 free dissolve 13 from the left and right sides to the middle expansion
14 expand from Middle to left, 15 from upper and lower ends to center
16 Expand from middle to bottom 17 from the upper right corner to the bottom left
18 from the Lower-right corner, expand 19 from the Upper-left corner to the lower-right corner
20 Expand 21 horizontal lines from the Lower-left corner to the upper-right corner
22 Vertical Linear Expansion 23 randomly produces a transition pattern

9, Clear the cache (re-visit this site to re-download!) )
HTML code
    1. <Meta http-equiv= "cache-control" content="no-cache">


10, set the expiration time of the webpage

HTML code
    1. <Meta http-equiv= "expires" content="0">


11, keywords, for the search engine
HTML code
    1. <Meta http-equiv= "keywords" content="keyword1,keyword2,keyword3">


12. Page Description
HTML code
    1. <Meta http-equiv="description" content= "this is my page">

Meta tag usage instructions (http-equiv, refresh, seo)

Related Article

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.