meta标签集

html中的meta总结:

0.声明文档使用的字符编码: <meta charset='utf-8'/>

1.优先使用 IE 最新版本和 Chrome : <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'/>

2.禁用掉UC浏览器判断到页面上文字居多时,会自动放大字体优化移动用户体验:<meta name="wap-font-scale" content="no"/>

3.页面描述:<meta name="description" content="不超过150个字符"/>

4.网页作者:<meta name="author" content="name,email@amall.com"/>

5.搜索引擎抓取:<meta name="robots" content="name,follow"/>

5-1.关键字:<meta name="keywords" content="关键字文字"/>

6.移动版:<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>

7.windows phone点击无高光:<meta name="msapplication-tap-heighlight" content="no"/>

8.针对手持设备优化,主要针对一些老的不识别viewport的浏览器,比如黑莓:<meta name="HandheldFriendly" content="true"/>

9.忽略页面中的数字识别为电话,忽略email识别:<meta name="format-detection" content="telephone=no,email=no"/>

10.页面自动刷新并指向新页面:<meta http-equiv="Refresh" content="2"; URL="http://www.baidu.com"/>

     (注:其中的2是指停留2秒钟后自动刷新到URL网址)

11.强制页面在当前窗口以独立页面显示:<meta http-equiv="Window-target" content="_top"/>

     (注:用来防止别人在框架里调用自己的页面)

12.指定是否显示图片工具栏,当为false代表不显示,当为true代表显示:<meta http-equiv="imagetoolbar" content="false"/>

13.UC强制全屏:<meta name="full-screen" content="yes"/>

14.QQ强制全屏:<meta name="x5-fullscreen" content="true">

15.不让百度转码:<meta http-equiv="Cache-Control" content="no-siteapp"/>

16.设置页面不缓存:<meta http-equiv="pragma" content="no-cache"/>

                                 <meta http-equiv="cache-control" content="no-cache"/>

                                 <meta http-equiv="expires" content="0"/>

 

针对苹果ios:

0.在iPhone手机上默认值是(电话号码显示为拨号的超链接):<meta name="format-detection"  content="telephone=yes"/>

1.ios设备对meta定义的私有属性:(可以添加至主屏幕)

    网站开启对web app 程序的支持(启用WebApp全屏模式):<meta name="apple-mobile-web-app-capable" content="yes"/>

    在web app应用下状态条(屏幕顶部条)的颜色:<meta name="apple-mobile-web-app-status-bar -style" content="black"/>

    (1.默认值为default<白色>,可以定为black<黑色>和black-translucent<灰色半透明>;

      2.若值为black-translucent 将会占页面的px位置,浮在页面的上方,会覆盖页面20px高度-iphone4和itouch4和itouch4的Retina屏幕为40px)

    <meta name=”apple-mobile-web-app-title” content=”标题”>

 

IOS用rel="apple-touch-icon",android 用rel="apple-touch-icon-precomposed"。这样就能在用户把网页存为书签时,在手机HOME界面创建应用程序样式的图标。
<link rel="apple-touch-icon" href="/static/images/identity/HTML5_Badge_64.png" />
<link rel="apple-touch-icon-precomposed" href="/static/images/identity/HTML5_Badge_64.png" />

posted @ 2017-09-30 14:47  MiniDuck  阅读(312)  评论(0编辑  收藏  举报