Meta标签

来源:互联网 发布:删失数据的处理 编辑:程序博客网 时间:2024/04/30 13:33

研究了一下Meta标签,发掘一下,不曾想,Meta标签里也藏着大学问。网站Meta标签的优化对于SEO还是有用的,不过看了很多网站都不太在意这个,很多Meta标签大家甚至都没有见过,今天我就把学到Meta标签和大家分享一下。

<meta name=”某个设置值” content=”对该设置值进行具体补充说明的信息”>
<meta http-equiv=”某个设置值” content=”对该设置值进行具体补充说明的信息”>
name属性的设置:
1-1,keywords告诉搜索引擎,把content属性中填入的内容作为网页的关键字添加到搜索引擎中,content属性中的多个关键字可以使用逗号分隔,例如:
<meta name=”keywords” content=”软件开发,java”>
1-2,Description,搜索引擎使用content属性中的设置信息未做对网站的描述
1-3,Robots告诉搜索引擎释放的robot或spider,根据content属性中的设置来决定采取什么样的行动方式。
          Content的值可以为:

           Index 可以检索和收录此页,这是默认值。

           Noindex 是不让robot/spider检索和收录此页。

           Follow 允许robot,spider顺着此页的超级链接往下探找。

           Nofollow是不让robot,spider顺着此页的超级链接往下探找。

           All告诉robot,spider可以检索和收录此页,而且可以顺着此页的超链接往下探找。

           None是既不让检索和收录此页,也不让robot,spider顺着此页顺着探找。

1-4,author用于说明网页的作者,content中填入网页的作者。

1-5,copyright用于版权声明,content中填入你的版权声明。

1-6,generator用于说明编辑此页所使用的工具的名称,content填入网页的编辑软件。

1-7, Link 用于引导内容链接,将蜘蛛及来访者引到网站内容根括页,一般来讲,只有大型网站才有这样的页面。content中填入你的网站的目录页或站点地图页。

1-8,Help用于引导帮助页面,告诉蜘蛛及来访者在哪一页上可获取站点的帮助信息, content中填入你的网站的帮助页面

1-9,revisit-after用于标记网站更新周期,引导蜘蛛来访。content中填入你的网站更新周期,可以把属性写成1 days这样的格式

1-10,reply-to用于告诉来访者和蜘蛛怎样联系网站管理人 content中填入你的邮件地址

1-11,Rating用于标记网站的级别,告诉蜘蛛你的网站适合哪些观众。一般用一下的值来标记:

                 14 Years (14岁以上)
                 General (都适合)
                 Mature Restricted (只限成年人)
                 Safe For Kids (适合儿童)
                 Page Expires (网站有效期)

1-12,Expires用于标记网页的有效期,告诉网页什么时间失效,content中填入你类似“Mon, 12 Jul 2001 02:18:12 GMT”这样格式的日期,这个一般不推荐用。

1-13,Language用于标记网页的语言,content中填入你的网页语言编码,中文就是zh-cn。

1-14,Distribution 用于标记网站发布范围,content中填入你的网站适用地区,一般使用“Global”表示在全球范围发布

1-15,Classification用于标记网站类型,告诉搜索引擎你的网站应被列到哪个目录下,content中填入你的网站所在目录,具体请参考分类目录列表。

Advertising and Marketing Agriculture
Antiques Arts and Crafts
Aviation Bar
Business Banking
Business Supplies
Business and Economy Career Services
Catalogs Children
Christmas Commercial
Communications Communications and Networking
Computer Multimedia Computers
Construction Consumer
Consumer Children Consumer Electronics
Design
Drinks Education
Emergency Services Engineering
Entertainment Entertainment Information
Entertainment Software Entertainment Support
Entertainment Site Family
Family Services Flags
Flowers Flowers and Gardening
Food and Beverage Freelance Services
Fund Raising General Hardware
General Merchandise General Software
Gift Baskets Gifts
Government Hardware
Hardware Peripherals Health
Health Nursing Hobbies
Human Resources Index Site
Internet Internet Services
Macintosh Mass Storage
Math Mature
Media Media Services
Medical Medical Dentistry
Medical Equipment Museums
Personal Recreational
Science Security Services
Social Science Software
Sports Tourism Airlines
Travel Agents Veterinary
Web Hosting Web Programming

1-16,Generator 用于标记网页使用什么工具或者语言开发,content中填入你的网页编辑器或者开发语言。
--------------------------------------------------------------------------------

2,http-equiv属性的设置:

       http-equiv属性是用来在HTML文档中模拟HTTP协议的响应消息头。

              2-1,content-type用于说明网页内容的MIME类型以及文本内容所使用的字符集编码。

                            <meta http-equiv=”content-type” content=”text/html;charset=gb2312”>

              2-2,Refresh用于告诉浏览器指定的某一时间段后自动对页面进行刷新,

                            <meta http-equiv=”Refresh” content=”1”>    时间单位是; 秒

              也可以让浏览器在一定时间后跳到其他网页,时间值与URL之间用分号(;)分隔

                            <meta http-equiv=”Refresh” content=”1;url=http://www.163.com”>

              2-3,Expires用于设定网页的到期时间,超过了content属性中指定的日期浏览器                         必须到服务器上重新下载该网页。注意content属性中的设置值必须使用GMT                   时间格式

                            <meta http-equiv=”Expires” content=”Mon,12    May 2001 00:02:00 GMT”>

                     CONTENT设置为0,可以禁止浏览器使用缓存页面

              2-4,Windows-Target强制页面在某个窗口中显示。要防止自己的网页别别人当作                        一个frame页面调用,可以使用

                            <meta http-equiv=”Windows-Target” content=”_top”>

              2-5,Pragma用于设定禁止浏览器在本地计算机上缓存次页面,content属性设置为

                     no-cache,例如,

                            <meta http-equiv=”Pragma” content=”no-cache”>

                     注意:

                            这个方法不可靠,当数据大于32K是还是会缓存,可以把它放到代码后                               面部分 或者,使用http协议的Cache-Control响应字段禁止缓存在                    HTTP1.1中,Cache-Control是一种比Pragma更可靠的实现,

                     <meta http-equiv=”Cache-Control” content=”no-cache”>

              2-6,Page-Enter设置浏览器的特殊显示效果

       <meta http-equiv=”Page-Enter” content=”revealTrans(Transition=23,Duration=1.000)”>

              2-7,Page-Exit 设置浏览器离开某个网页时,所采取的特殊显示效果

-------------------------------------------------------------------------------------------------------------------

后记:Least再次提醒大家,上面的标签不要滥用,要根据需要,
下面我给一个示例:
<title>cnBeta.COM_网友媒体与言论平台</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta http-equiv="expires" content="0" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="author" content="cnBeta" />
<meta name="generator" content="jianglb.com" />
<meta name="copyright" content="Copyright (c) 2007 cnBeta. All Rights Reserved." />
<meta name="robots" content="index, follow" />
<meta name="revisit-after" content="1 days" />
<meta name="rating" content="general" />
<meta name="keywords" content="简明IT新闻,IT业界资讯,网友媒体,言论平台" />
<meta name="description" content="cnBeta.com为您提供最新最快IT业界资讯,报导立场公正中立,网友讨论气氛浓厚.创造出最适合目标人群阅读的新闻、评论、观点和专访" />

原创粉丝点击