欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  SEO定义
 
  SearchEngineOptimization搜索引擎优化
 
  一,常用的HTTP-EQUIV类型:
 
  Set-Cookie(cookie设定)
 
  说明:如果网页过期,存盘的cookie将会被删除(必须是GMT的时间格式)
 
  <metahttp-equiv="Set-Cookie"content="cookievalue=xxx;expires=Wednesday,21-Oct-9816:14:21GMT;path=/">
 
  Window-target(显示窗口的设定)
 
  说明:强制页面在当前窗口以独立页面显示----用来防止别人在框架里面调用你的页面
 
  <metahttp-equiv="Window-target"content="_top">
 
  Content-Type(显示字符集的设定)
 
  说明:设定页面使用的字符集
 
  <metahttp-equiv="Content-Type"content="text/html;charset=utf-8">
 
  expires(期限)
 
  说明:用于设定网页的到期时间,一旦网页过期,必须到服务器上重新调阅(必须使用GMT的时间格式)
 
  <metahttp-equiv="expires"content="Wed,26Feb201608:21:57GMT">
 
  Pragma(cache模式)
 
  说明:禁止浏览器从本地机的缓存中调阅页面内容(访问者无法脱机浏览)
 
  <metahttp-equiv="Pragma"content="no-cache">
 
  Refresh(刷新)
 
  说明:需要让页面定时链接到其他页面的话,就用这句(停留五秒后自动跳转到URL地址)
 
  html中的meta信息里可以直接设置跳转,可以设置跳转延迟时间和跳转url,经常应用,比如支付完了告诉用户支付成功并跳转到订单页面。下面的列子表示:5秒钟后页面会自动跳转到http://www.myqingmei.cn。
 
  <metahttp-equiv="refresh"content="5;url=www.myqing.cns">
 
  二,meta标签name变量语法
 
  keywords(关键字)---已经过时
 
  说明:用来告诉搜索引擎你网页的关键字是什么
 
  <metaname="keywords"content="xxx">
 
  description(简介)------(import)
 
  说明:用来告诉搜索引擎你网站的主要内容
 
  <metaname="description"content="xxx">
 
  robots(机器人向导)------(import)
 
  说明:robots用来告诉搜索机器人哪些页面需要索引哪些不需要;用来阻止搜索引擎获取拷贝页面、私密页面和未完成的页面.content参数有:all,none,index,noindex,follow,nofollow.默认all
 
  <metaname="robots"content="none">
 
  其中:
 
  all:文件将被检索,且页面上的链接可以被查询;
 
  none:文件将不被检索,且页面上的链接不可以被查询;
 
  index:文件将被检索;
 
  follow:页面上的链接可以被查询;
 
  noindex:文件将不被检索;
 
  nofollow:页面上的链接不可以被查询。
 
  author(作者)
 
  说明:标注网页的作者
 
  <metaname="author"content="huangqingmei">
 
  notranslate----(important)
 
  说明:有时,Google在结果页面会提供一个翻译链接,但有时候你不希望出现这个链接
 
  <metaname=”google”content=”notranslate”/>
 
  三,以下是一些不常用的例子和简要的说明
 
  <metaname="viewport"content="width=device-width,initial-scale=1"/>
 
  viewport属性说明:
 
  width:可视区域的宽度,值可为数字或关键词device-width
 
  height同width
 
  intial-scale:页面首次被显示时可视区域的缩放级别,取值1.0则页面按实际尺寸显示,无任何缩放
 
  maximum-scale=1.0,minimum-scale=1.0;可视区域的缩放级别,
 
  maximum-scale用户可将页面放大的程序,1.0将禁止用户放大到实际尺寸之上。
 
  user-scalable:是否可对页面进行缩放,no禁止缩放
 
  <metaname="googlebot"content="index,follow"/>
 
  <metaname="verify"content="index,follow"/>
 
  <metahttp-equiv="X-UA-Compatible"content="IE=edge"/>
 
  <metaname="google"content="index,follow"/>
 
  启用WebAPP全屏模式
 
  <metaname="apple-mobile-web-app-capable"content="yes"/>
 
  隐藏状态栏/设置状态栏颜色:只有在开启WebApp全屏模式时才生效。content的值为default|black|black-translucent。
 
  <metaname="apple-mobile-web-app-status-bar-style"content="black-translucent"/>
 
  添加到主屏后的标题
 
  <metaname="apple-mobile-web-app-title"content="标题">
 
  忽略数字自动识别为电话号码
 
  <metacontent="telephone=no"name="format-detection"/>
 
  忽略识别邮箱
 
  <metacontent="email=no"name="format-detection"/>
 
  针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓
 
  <metaname="HandheldFriendly"content="true">
 
  微软的老式浏览器
 
  <metaname="MobileOptimized"content="320">
 
  uc强制竖屏
 
  <metaname="screen-orientation"content="portrait">
 
  QQ强制竖屏
 
  <metaname="x5-orientation"content="portrait">
 
  UC强制全屏
 
  <metaname="full-screen"content="yes">
 
  QQ强制全屏
 
  <metaname="x5-fullscreen"content="true">
 
  UC应用模式
 
  <metaname="browsermode"content="application">
 
  QQ应用模式
 
  <metaname="x5-page-mode"content="app">
 
  windowsphone点击无高光
 
  <metaname="msapplication-tap-highlight"content="no">
 
  四,实例
 
  在html页面上设置不缓存
 
  <metahttp-equiv="pragma"content="no-cache">
 
  <metahttp-equiv="cache-control"content="no-cache">
 
  <metahttp-equiv="expires"content="0">
 
  

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h56459.shtml