<!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@gmail.com”/> //網頁作者
<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” /> //不讓百度轉碼針對手持設備優化,主要是針對一些老的不識別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強制全屏 QQ強制全屏
<meta name=”browsermode” content=”application”> //UC應用模式
<meta name=”x5-page-mode” content=”app”> //QQ應用模式
<meta name=”msapplication-tap-highlight” content=”no”> //windows phone 點擊無高光設置頁面不緩存
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”expires” content=”0″>
第一篇簡書文章
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。