<meta name="keywords" content="your tags" />
<meta name="description" content="150 words" />
robotterms是一組使用逗號(,)分割的值,一般有以下幾種取值:none,noindex,nofollow,all,index和follow。確保正確使用nofollow和noindex屬性值。web
<meta name="robots" content="index,follow" /> <!-- all:文件將被檢索,且頁面上的連接能夠被查詢; none:文件將不被檢索,且頁面上的連接不能夠被查詢; index:文件將被檢索; follow:頁面上的連接能夠被查詢; noindex:文件將不被檢索; nofollow:頁面上的連接不能夠被查詢。 -->
content內的數字表明時間(秒),既多少時間後刷新。若是加url,則會重定向到指定網頁(搜索引擎可以自動檢測,也很容易被引擎視做誤導而受到懲罰).chrome
<meta http-equiv="refresh" content="0;url=" />
<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 name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
width:寬度(數值 / device-width)(範圍從200 到10,000,默認爲980 像素)windows
height:高度(數值 / device-height)(範圍從223 到10,000)瀏覽器
initial-scale:初始的縮放比例 (範圍從>0 到10)緩存
minimum-scale:容許用戶縮放到的最小比例app
maximum-scale:容許用戶縮放到的最大比例ide
user-scalable:用戶是否能夠手動縮 (no,yes)優化
minimal-ui:能夠在頁面加載時最小化上下狀態欄。(已棄用)網站
注意,不少人使用initial-scale=1到非響應式網站上,這會讓網站以100%寬度渲染,用戶須要手動移動頁面或者縮放。若是和initial-scale=1同時使用user-scalable=no或maximum-scale=1,則用戶將不能放大/縮小網頁來看到所有的內容。ui
<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-translucent" />
<meta name="apple-mobile-web-app-title" content="標題">
<meta name="format-detection" content="telephone=no,email=no" />
<!-- 針對手持設備優化,主要是針對一些老的不識別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 charset='utf-8' />
<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 -->
國內瀏覽器不少都是雙內核(webkit和Trident),webkit內核高速瀏覽,IE內核兼容網頁和舊版網站。而添加meta標籤的網站能夠控制瀏覽器選擇何種內核渲染
<meta name="renderer" content="webkit|ie-comp|ie-stand">
國內雙核瀏覽器默認內核模式以下:
搜狗高速瀏覽器、QQ瀏覽器:IE內核(兼容模式)
360極速瀏覽器、遨遊瀏覽器:Webkit內核(極速模式)
這樣設定,訪問者將沒法脫機瀏覽
<meta http-equiv="Pragma" content="no-cache">