<meta> 元素可提供有关页面的相关元信息小结篇

来源:互联网 发布:天津app软件开发 编辑:程序博客网 时间:2024/06/10 07:06
<!--移动端--><!--viewport:能优化移动浏览器的显示。如果不是响应式网站,不要使用initial-scale或者禁用缩放    width:宽度(数值 / device-width)(范围从200 到10,000,默认为980 像素)    height:高度(数值 / device-height)(范围从223 到10,000)    initial-scale:初始的缩放比例 (范围从>0 到10)    minimum-scale:允许用户缩放到的最小比例    maximum-scale:允许用户缩放到的最大比例    user-scalable:用户是否可以手动缩 (no,yes) --><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,user-scalable=no"><!--忽略数字自动识别为电话号码    忽略识别邮箱--><meta name="format-detection" content="telephone=no"/><meta content="email=no" name="format-detection"/><!--伪装app,离线应用--><meta name="apple-mobile-web-app-capable" content="yes"><!-- 启用 WebApp 全屏模式 --><!--隐藏状态栏/设置状态栏颜色:只有在开启WebApp全屏模式时才生效。    content的值为default | black | black-translucent 。--><meta name=”apple-mobile-web-app-status-bar-style” content=”black”/><!--添加到主屏后的标题--><meta name="apple-mobile-web-app-title" content="标题"><!--添加智能 App 广告条 Smart App Banner:告诉浏览器这个网站对应的app,并在页面上显示下载banner(如下图)。参考文档--><meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL"><!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 --><meta name="HandheldFriendly" content="true"><!-- 微软的老式浏览器 --><meta name="MobileOptimized" content="320"><!--HTML5页面强制竖屏和全屏,部分浏览器兼容--><!-- 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 name="apple-touch-fullscreen" content="yes"><!--向服务器发送了名称/值对:content-type: text/html,    这将告诉浏览器准备接受一个HTML文档。charset = utf-8 指的是编码方式为utf-8编码--><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><!--页面定期刷新,如果加url的,则会重新定向到指定的网页,content后面跟的是时间(单位秒)    新闻页面,论坛等,不过一般不会用这个,都用新的技术比如ajax等    这里0表示没有延时,直接跳转到后面的URL;把0改成1,则延时1秒后跳转--><meta http-equiv="refresh" content="0;url=" /><!--SEO优化--><meta name="keywords" content=""/><meta name="msapplication-tap-highlight" content="no"><meta name="description" content=""/><meta name="robots" content="index,follow" /><meta name="author" content="author name" /> <!-- 定义网页作者 --><meta name="google" content="index,follow" /><meta name="googlebot" content="index,follow" /><meta name="verify" content="index,follow" /><!--网页相关--><!--申明编码--><meta charset='utf-8' /><!--优先使用 IE 最新版本和 Chrome--><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><!-- 关于X-UA-Compatible --><meta http-equiv="X-UA-Compatible" content="IE=6" ><!-- 使用IE6 --><meta http-equiv="X-UA-Compatible" content="IE=7" ><!-- 使用IE7 --><meta http-equiv="X-UA-Compatible" content="IE=8" ><!-- 使用IE8 --><!--转码申明:用百度打开网页可能会对其进行转码(比如贴广告),避免转码可添加如下meta--><meta http-equiv="Cache-Control" content="no-siteapp" />