之前做了一个捕鱼儿的营销页面,在其他浏览器上都是好好的,但是一到360浏览器上就乱了,写的js代码解析错误。疑惑的是我的360浏览器是最新的版本,IE11版本的,按理说不会有兼容性问题啊。后来在网上查了一下,原来是meta标签的原因。为了最大限度的兼容360,需要在添加meta标签<meta name=“render” content=“ie-stand”>让浏览器默认以IE标准内核解析页面。
顺便也搜集了其它的meta标签
keywords,description(经常用到的两个)
页面的关键字和描述,是写给搜索引擎看的,关键字可以有多个用 ‘,’号隔开
<meta name="keywords" content="HTML,CSS,JAVASCRIPT,PHP">
<meta name="description" content="html meta标签大全,整理一下加强记忆">
Content-Type
告诉浏览器当前访问的资源类型
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
refresh
重定向(以下示例5秒后会跳转到:http://blog.csdn.net)
<meta http-equiv="refresh" content="5;url="http://blog.csdn.net" />
full-screen
全屏显示网页(部分移动端浏览器的专有属性)
<meta name="full-screen" content="yes"/>
browsermode
浏览器模式-强制坚屏显示(部分移动端浏览器的专有属性),
<meta name="browsermode" content="application"/>
数据格式验证渲染:
telephone:而iPhone会自动把你这个文字加链接样式、并且点击这个数字还会自动拨号!默认开启
email:浏览器会识别邮箱并加样式,点击可以调用系统默认邮件应用给该地址发邮件,默认开启
adress:adress=yes就开启了点击地址直接跳转至地图的功能,默认开启
<meta content="telephone=no" name="format-detection" />
<meta content="telephone=no,email=no,adress=no" name="format-detection" />
x5-orientation
QQ浏览器强制竖屏
<meta name="x5-orientation" content="portrait"/>
x5-fullscreen
QQ浏览器强制全屏
<meta name="x5-fullscreen" content="true"/>
x5-page-mode
QQ浏览器应用模式
<meta name="x5-page-mode" content="app"/>
X-UA-Compatible
IE的兼容模式:以IE的哪个版本去渲染页面(IE=8:以IE8的模式去渲染页面,IE=Edge:以最新版本的IE去渲染页面,当然这个最新指的是你系统装的最高版本的IE)
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
expires(期限)
可以用于设定网页的到期时间。一旦网页过期,必须到服务器上重新调阅
必须使用GMT的时间格式
<meta http-equiv="expries" content="Wed, 26 Feb 2012 08:21:57 GMT" />
pragma(cach模式)
禁止浏览器从本地的缓存中调阅页面内容
设定后访问者将无法脱机浏览
<meta http-equiv="pragma" content="no-cache" />
refresh(刷新)
定时让网页自动链接到指定URL,单位是秒
<meta http-equiv="refresh" content="5;url="http://www.baidu.com" />
set-cookie(cookies设定)
定义Cookies
<meta http-equiv="set-cookie" content="cookievalue=xxx;expires=Wed, 26 Feb 2012 08:21:57 GMT;path=/" />
window-target(显示窗口的设定)
设置当前窗口页面显示方式
如果设置成_top就会强制页面在当前窗口以独立页面显示,防止别人在框架里调用页面
<meta http-equiv="window-target" content="_top" />
author(作者)
标网页作者
<meta name="author" content="cqqjj1029@gmail.com" />
renderer
这貌似是360浏览器专用,兼容360的利器啊,,360默认是用IE7去渲染页面的,不管你的系统装了多高版本的IE,这种行为真是业界毒瘤啊。
<meta name="renderer" content="webkit">
<meta name="renderer" content="ie-comp">
<meta name="renderer" content="ie-stand">