meta - lilunze/lilunze.github.io GitHub Wiki
[TOC]
A list of something that could use in the <head> of your html document
- 设置页面视图渲染宽度等于设备宽度,初始缩放比为1,并禁止用户缩放
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,shrink-to-fit=no">
- 忽略页面中对手机号码和电子邮件的识别
<meta name="format-detection" content="telephone=no,email=no">
- 设置页面的编码方式,防止页面乱码
<meta charset="utf-8">
- 优先使用IE最新版本和chrome浏览器渲染,针对多核浏览器
<meta http-equiv="X-UA-Compatible" content="IE=dege,chrome=1">
- 设置默认使用的浏览器渲染内核
<meta name="renderer" content="webkit|ie-comp|ie-stand">
- 禁止浏览器从缓存中访问页面内容,设置后,访问者将无法脱机访问
<meta http-equive="Pragma" content="no-cache">
- 定义页面加载资源基于某一路径
<base href="http://localhost:8080">
- 定义浏览器不支持script标签时显示的内容
<noscript>您的浏览器不支持运行脚本</noscript>
- 设置网页安全政策CSP
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
- 设置APP的名字
<meta name="application-name" content="Application Name">
- 设置favicons(针对IE10以及以上高级浏览器)
<link rel="icon" type="image/png" sizes="16x16" href="/path/to/favicon.png">
- 设置UC浏览器横竖屏
<meta name="screen-orientation" content="landscape/portrait">