参考文章:

HTTP --meta详解 http://www.cnblogs.com/xiaoweizhi/p/4723848.html

meta标签的作用及整理 http://blog.csdn.net/yc123h/article/details/51356143

 

Meta:

     元数据(metadata)是关于数据的信息。其内容不会展现在页面上,meta里的数据是供机器解读的,告诉机器该如何解析这个页面。meta 元素被用于规定页面的描述、关键词、文档的作者、最后修改时间等信息。

meta 由两部分组成:

  • content
  • http-equiv | name|scheme 

name常用属性:

  • keywords (搜索引擎使用的关键字 <meta name="keywords" content="meta,元数据">)
  • author       (作者  <meta name="author" content="root,root@xxxx.com">)
  • description (页面描述信息)
  • robots (robots用来告诉搜索机器人哪些页面需要索引,哪些页面不需要索引:content的参数有all,none,index,noindex,follow,nofollow。默认是all)
  • viewport (移动设备上使用视图缩放<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />)
  • copyright(版权归属 <meta name="copyright" content="http://www.Denny.com"/>)

  • date (设置网页生成时间 <meta name="date" content="2008-07-12T20:50:30+00:00">)

http-equiv 常用属性:

  • content-Type(显示字符集的设定)  <meta http-equiv="content-Type" content="text/html;charset=gb2312">
  • Refresh(刷新跳转页面)                 <meta http-equiv="refresh" content="5;${pageContext.request.contextPath}/***">
  • content-Language(显示语言的设定)   <meta  http-equiv="Content-Language"   content="zh-cn"/>
  • Expires(设置到期时间)   <meta http-equiv="expires" content="Fri,12Jan200118:18:18GMT">    必须使用GMT的时间格式
  • pragma(设置缓存周期)                            <meta http-equiv="pragma" content="no-cache" />      ()

 

 

 

 

 

 

 

同时不同浏览器又扩充自定义自己识别的name和value。

  

posted on 2017-11-08 10:39  zhaoqiang1980  阅读(85)  评论(0编辑  收藏  举报