web前端常用的meta

来源:互联网 发布:豆瓣fm windows 编辑:程序博客网 时间:2024/05/22 09:38
 1.设置编码信息  
 <meta http-equiv="Content-Type" Content="textml; Charset=utf-8" /> 
2.设置语言 
  <meta http-equiv="Content-Language" Content="zh-CN" /> 
3.设置重定向 
  <meta http-equiv="Refresh" Content="15; Url=http://www.baidu.com" /> 
4.设置缓存时间  
 <meta http-equiv="Expires" Content="Web, 26 Jun 2015 18:21:57 GMT" /> 
5.不使用缓存  
 <meta http-equiv="Pragma" Content="No-cach" /> 
6.设置关键字 
 <meta name="Keywords" Content="key1,key2,..." /> 
7.设置描述信息  
 <meta name="Description" Content="description abc" /> 
8.设置对搜索引擎抓取  
 <meta name="Robots" Content="All|None|Index|Noindex|Follow|Nofollow" /> 
9.设置可视区域  
 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> 
10.禁用手机自带的效果
 <meta name="format-detection" content="telephone=no">
11.让网页自动调用双核浏览器的极速模式(Webkit),IE兼容或IE标准模式
 <meta name="renderer" content="webkit|ie-comp|ie-stand">
12.使用浏览器最高版本
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">


浏览器使用:   
<!-- 国产浏览器内核选择 --> 
 <meta name="renderer" content="webkit|ie-comp|ie-stand"> 
<!-- 使用最新版的ie浏览器,或者chrome-->  
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>  
<!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 --> <meta name="HandheldFriendly" content="true"> 
<!-- 微软的老式浏览器 -->  
 <meta name="MobileOptimized" content="320"> 
<!-- uc强制竖屏 -->  
 <meta name="screen-orientation" content="portrait"> 
<!-- QQ强制竖屏 -->  
 <meta name="x5-orientation" content="portrait"> 
<!-- UC强制全屏 -->  
 <meta name="full-screen" content="yes"> 
<!-- QQ强制全屏 -->  
 <meta name="x5-fullscreen" content="true"> 
<!-- UC应用模式 -->  
 <meta name="browsermode" content="application"> 
<!-- QQ应用模式 -->  
 <meta name="x5-page-mode" content="app"> 
<!-- windows phone 点击无高光 -->  
 <meta name="msapplication-tap-highlight" content="no"> 
<!-- 禁止转码 -->  
 <meta http-equiv="Cache-Control" content="no-siteapp" /> 
禁止数字识自动别为电话号码  
 <meta name="format-detection" content="telephone=no" /> 
禁止识别邮箱  
 <meta name="format-detection" content="email=no" />
0 0