◎ 关于META标签用法的详细说明(全集)  - DAvid翻译于[8/28/00]


前面我们看了阿捷的《关于Meta标签的妙用》,这次我们更加详细地、从不同的角度来阐述这个神奇的 TAG(标签)。

Meta标签有两种可能的属性:

<Meta http-equiv="名称" content="内容">
<Meta name="名称" content="内容">

Meta标签必须被放在 html的<head>和</head>里面,要是框架结构的话,要放在“框架页”上。

□ 关于 http-equiv 标签(对了,“标记”与“标签”是一回事,英文都是Tag,中文花样可就多了!)

http-equiv的 Meta标记用来修饰 http(超链接文本传输协议)的“头”信息,它的典型作用就是控制浏览器的动作,用来重新定义头信息。它不能通过代理服务器(Proxy),能被Netscape Navigator和Apache Server(linux下的WWW服务器,使用很广泛)。http/1.0和http/1.1协议都能够支持http的“头”信息。它可以由CGI来产生。

·Content-Disposition
指定一个应用程序
Content-Type: text/comma-separated-values
Content-Disposition: inline; filename=openinexcel.csv

·Expires(期限)
要求重新检查服务器上是否有更新。“0”表示每次都检查。(对于后台的一些程序来说会用到)机器人会把过期的资料从搜索引擎上干掉,或者计划一个重新访问时间。必须为GMT的时间格式。
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 2001 08:21:57 GMT">
or (HTTP header):
Expires: Wed, 26 Feb 1997 08:21:57 GMT

·Pragma
控制浏览器不使用临时交换文件(Cache)。使用浏览器的刷新时,强制从服务器读。并且不让 Netscape产生Cache。

·Content-Type
让浏览器能够正常显示不同的字符集。(比如显示日文字符集)
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-2022-JP">

·Content-Script-Type
注释语言(Script)的类型
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">

·Content-Style-Type
定义一个文档的默认样式
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

·Content-Language
描述文档的语言
<META HTTP-EQUIV="Content-Language" CONTENT="en-GB">
or (HTTP header)
Content-language: en-GB

· Refresh(刷新)
定义一个延迟时间(秒),浏览器重新加载该页。(常用于页面跳转)
<META HTTP-EQUIV="Refresh" CONTENT="3;URL=http://guoshuang.go.163.com/">
or (HTTP header)
Refresh: 3;URL=http://www.some.org/some.html

·window-target
指定当前页面的名字,禁止页面在框架内显示。(不是所有浏览器都支持!IE就不行)
<META HTTP-EQUIV="Window-target" CONTENT="_top">
or (HTTP header)
Window-target: _top

·Ext-cache
定义网景浏览器Cache的名称
<META HTTP-EQUIV="Ext-cache" CONTENT="name=/some/path/index.db; instructions=User Instructions">

·Set-Cookie
为网景浏览器设置Cookie,写入一些信息,并存在客户端的硬盘上。
<META HTTP-EQUIV="Set-Cookie"
CONTENT="cookievalue=xxx;expires=Friday, 31-Dec-99 23:59:59 GMT; path=/">

·PICS-Label
Platform-Independant Content rating Scheme. Typically used to declare a document's rating in terms of adult content (sex, violence, etc.) although the scheme is very flexible and may be used for other purposes.

·Cache-Control
定义Cache(缓存)块。
Public - 放在公用缓存里
Private - 放在个人缓存里
no-cache - 不进行缓存处理
no-store - 进行缓存处理但是不归档
Note that browser action is undefined using these headers as META tags.

·Vary
Specifies that alternates are available. implies that if a header Accept-Language is sent an alternate form may be selected.
<META HTTP-EQUIV="Vary" CONTENT="Content-language">
or (HTTP header)
Vary: Content-language

· Lotus
The Lotus publishing tool generates Bulletin-Date and Bulletin-Text attributes. Bulletin-Text contains a document description.

□ 关于NAME 的属性
META tags with a name attribute are used for other types which do not correspond to HTTP headers. Sometimes the distinction is blurred; some agents may interpret tags such as "keywords" declared as either "name" or as "http-equiv".

Robots
Controls Web robots on a per-page basis. Robots may traverse this page but not index it. 控制机器人
<META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW">
Altavista supports:
NOINDEX 禁止被索引
NOFOLLOW prevents the crawler from following the links on the page and indexing the linked pages.
NOIMAGEINDEX 图片不索引
NOIMAGECLICK prevents the use of links directly to the images, instead there will only be a link to the page.

·Description
Source: Spidering, AltaVista, Infoseek.
网页主题的简单描述,用于搜索引擎的描述
<META NAME="description" CONTENT="Citrus fruit wholesaler.">

·Keywords
Source: AltaVista, Infoseek.
关键字
<META NAME="keywords" CONTENT="oranges, lemons, limes">

·Author
标志作者

·Generator
Source: Publishing tools, e.g. Netscape Gold, FrontPage, etc.
标明主页的制作工具和版本号,可以用来评估各种工具的占有率情况

·Formatter
Source: Publishing tools - Microsoft FrontPage

·Classification
Source: Netscape Gold
不清楚

·Copyright
Source: Publishing tools
版权

·Rating
Source: mk-metas, Weburbia (safe for kids)
Simple content rating.

·VW96.ObjectType
Source: mk-metas
Based on an early version of the Dublin Core report, using a defined schema of document types such as FAQ, HOWTO.
Defined by Queen's University of Belfast; a restricted set including e.g. "Contact Information", "Image".

·Dublin Core
DC.TITLE, DC.CREATOR, DC.SUBJECT , DC.DESCRIPTION , DC.PUBLISHER , DC.CONTRIBUTORS , DC.DATE , DC.TYPE, DC.FORMAT , DC.IDENTIFIER, DC.SOURCE , DC.LANGUAGE , DC.RELATION, DC.COVERAGE, DC.RIGHTS
Dublin Core Elements. See the Reference Description

·HTML 4.0
The HTML 4.0 Specification is now available.

· HTdig
htdig-keywords, htdig-noindex
HTdig tags.

·DC-CHEM
DC-CHEM. See Chemical Metadata extensions.

·HTdig notification
htdig-email, htdig-notification-date, htdig-email-subject - see HTdig notification.

·searchBC
searchBC is a regional search engine which uses a number of common tags such as Keywords. revisit is used as a hint for scheduling revisits.

·Apple META tags
Author-Corporate, Author-Personal, Author-Personal, Publisher-Email, Identifier-URL, Identifier, Coverage, Bookmark -

·Kodak
EKBU, EKdocType, EKdocOwner, EKdocTech, EKreviewDate, EKArea - as used by Eastman Kodak.

·IBM
ABSTRACT, CC, ALIAS, OWNER - as used by IBM.

·Page-Enter, Page-Exit, Site-Enter, Site-Exit
Source: Microsoft DHTML
Defines special effects transition; e.g.
<meta http-equiv="Page-Enter"
content="revealTrans(Duration=3.0,Transition=2)">
See e.g. Transitions Between Pages (Ruleweb)

·SHOE
Instance-Delegate, Instance-Key - see the SHOE Project at the University of Maryland (Simple HTML Ontology Extensions)

·Microsoft Word
Microsoft Word 97 supports a number of HTML META attributes in the HTML export option. Content-Type is used to set the charset, Generator is set and various other tags may optionally be set.

·SIC87
1987 US SIC (Standard Industry Codes), used in Vancouver Webpages Classifieds. See US SIC Codes

※ 关于Meta的东西,我越看越头晕,因为它在不断扩充,所以如果你英文好!请到下面链接去看!

Vancouver Webpages
This document is available online at http://vancouver-webpages.com/META/


- DAvid翻译于[8/28/00]