美文网首页
h5各类meta标签功能

h5各类meta标签功能

作者: 燕_梦 | 来源:发表于2019-07-13 18:50 被阅读0次

IE=edge告诉IE使用最新的引擎渲染页面,chrome=1则可以激活chrome frame

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
若页面需默认用极速核,增加标签:<meta name="renderer" content="webkit">

若页面需默认用ie兼容内核,增加标签:<meta name="renderer" content="ie-comp">

若页面需默认用ie标准内核,增加标签:<meta name="renderer" content="ie-stand">

页面缓存时间的最大值是0秒,目的是不让页面缓存,每次访问必须到服务器读取

<meta http-equiv="Cache-Control"content="max-age=0"/>

在测试某个 SPA 项目时,发现更改后 Chrome 浏览器页面刷新还是使用之前的版本。经调查发现 Chrome 默认缓存值为 300 秒。
经测试跨浏览器禁止缓存的 headers 如下:

 <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

添加到主屏幕后,全屏显示。
如果content设置为yes,Web应用会以全屏模式运行,反之,则不会。content的默认值是no,表示正常显示。你可以通过只读属性window.navigator.standalone来确定网页是否以全屏模式显示。

 <meta name="apple-mobile-web-app-capable" content="yes">

默认值为default(白色),可以定为black(黑色)和black-translucent(灰色半透明)。

<meta name=”apple-mobile-web-app-status-bar-style” content=black” />

当该 HTML 页面在手机上浏览时,该标签用于指定是否将网页内容中的手机号码显示为拨号的超链接。
默认是yes,不希望设置为超链接则设置为false.

 <meta name="format-detection" content="telephone=no">
<meta name=”screen-orientation” content=”portrait”>   uc强制竖屏
<meta name="x5-orientation" content="portrait"> qq强制竖屏

相关文章

网友评论

      本文标题:h5各类meta标签功能

      本文链接:https://www.haomeiwen.com/subject/grmmkctx.html