HTML中的meta標籤作用(一)

<!DOCTYPE html>  H5標準聲明,使用 HTML5 doctype,不區分大小寫
<head lang=”en”> 標準的 lang 屬性寫法
<meta charset=’utf-8′>    聲明文檔使用的字符編碼
<meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″/>   優先使用 IE 最新版本和 Chrome
<meta name=”description” content=”不超過150個字符”/>       頁面描述
<meta name=”keywords” content=””/>      頁面關鍵詞
<meta name=”author” content=”name, [email protected]”/>    網頁作者
<meta name=”robots” content=”index,follow”/>      搜索引擎抓取
<meta name=”viewport” content=”initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no”> 爲移動設備添加 viewport
<meta name=”apple-mobile-web-app-title” content=”標題”> iOS 設備 begin
<meta name=”apple-mobile-web-app-capable” content=”yes”/>  添加到主屏後的標題(iOS 6 新增)
是否啓用 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”/>  設置蘋果工具欄顏色
<meta name=”renderer” content=”webkit”>  啓用360瀏覽器的極速模式(webkit)
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>     避免IE使用兼容模式
<meta http-equiv=”Cache-Control” content=”no-siteapp” />    不讓百度轉碼
<meta name=”HandheldFriendly” content=”true”>     針對手持設備優化,主要是針對一些老的不識別viewport的瀏覽器,比如黑莓
<meta name=”MobileOptimized” content=”320″>   微軟的老式瀏覽器
<meta name=”screen-orientation” content=”portrait”>   uc強制豎屏
<meta name=”x5-orientation” content=”portrait”>    QQ強制豎屏
<meta name=”full-screen” content=”yes”>              UC強制全屏
<meta name=”x5-fullscreen” content=”true”>       QQ強制全屏
<meta name=”browsermode” content=”application”>   UC應用模式
<meta name=”x5-page-mode” content=”app”>    QQ應用模式
<meta name=”msapplication-tap-highlight” content=”no”>    windows phone 點擊無高光
設置頁面不緩存:
1.<meta http-equiv=”pragma” content=”no-cache”>
2.<meta http-equiv=”cache-control” content=”no-cache”>
3.<meta http-equiv=”expires” content=”0″>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章