我有一个页面将包含在他们使用以下内容的页面上的 iframe 中:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
理想情况下,我想使用用户正在使用的浏览器可用的最新标准模式来呈现我的页面。这可能吗?
我试过包括
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
在我的页面上,以及更改我的 web 应用程序以包含值为 'IE=edge' 的 'X-UA-Compatible' HTTP 标头,但我似乎无法让它做我想做的事。
奇怪的是,例如,如果我有两个页面,第一个包含 iframe,另一个是 iframe 中显示的内容,如下所示:
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<script>
console.log("Page document mode: "+document.documentMode);
</script>
</head>
<body>
<iframe src="iframepage.html" />
</body>
</html>
和
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script>
console.log("Iframe document mode: "+document.documentMode);
</script>
</head>
<body>
</body>
</html>
输出是相当出乎意料的
Page document mode: 7
Iframe document mode: 8
文档模式8从何而来?以及如何将 iframe 文档变成 9 或更高版本?
如果有人能指出我正确的方向,我将永远感激不尽!!谢谢,尼克