手機網頁meta,添加使其兼容各類瀏覽器

雖然手機不像電腦那樣會有各類低版本的瀏覽器,但寫手機端網頁也是須要注意的:ios

<!-- 優先使用 IE 最新版本和 Chrome --> web

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>chrome

<!-- 頁面描述 -->windows

<meta name="description" content="不超過150個字符"/> 瀏覽器

<!-- 頁面關鍵詞 -->app

<meta name="keywords" content=""/> webapp

<!-- 網頁做者 -->工具

<meta name="author" content="name, email@gmail.com"/> 優化

<!-- 搜索引擎抓取 --> ui

<meta name="robots" content="index,follow"/>

<!-- 爲移動設備添加 viewport -->

<meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">

<!-- `width=device-width` 會致使 iPhone 5 添加到主屏後以 WebApp 全屏模式打開頁面時出現黑邊 http://bigc.at/ios-webapp-viewport-meta.orz -->

<!-- iOS 設備 begin -->

<meta name="apple-mobile-web-app-title" content="標題">

<!-- 添加到主屏後的標題(iOS 6 新增) -->

<meta name="apple-mobile-web-app-capable" content="yes"/>

<!-- 是否啓用 WebApp 全屏模式,刪除蘋果默認的工具欄和菜單欄 -->

<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">

<!-- 添加智能 App 廣告條 Smart App Banner(iOS 6+ Safari) -->

<meta name="apple-mobile-web-app-status-bar-style" content="black"/>

<!-- 設置蘋果工具欄顏色 -->

<meta name="format-detection" content="telphone=no, email=no"/>

<!-- 忽略頁面中的數字識別爲電話,忽略email識別 -->

<!-- 啓用360瀏覽器的極速模式(webkit) -->

<meta name="renderer" content="webkit">

<!-- 避免IE使用兼容模式 -->

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- 不讓百度轉碼 -->

<meta http-equiv="Cache-Control" content="no-siteapp" />

<!-- 針對手持設備優化,主要是針對一些老的不識別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">

相關文章
相關標籤/搜索