尝试使用IE = EmulateIE7在页面上的iframe中使用IE = edge X-UA-Compatible [英] Trying to use IE=edge X-UA-Compatible in an iframe on a page using IE=EmulateIE7

查看:138
本文介绍了尝试使用IE = EmulateIE7在页面上的iframe中使用IE = edge X-UA-Compatible的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面将包含在页面上的iframe中,他们使用以下内容:

I have a page that's going to be included in an iframe on a page where they use the following:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

理想情况下,我想使用浏览器可用的最新标准模式渲染我的页面用户正在使用。这可能吗?

and ideally I'd like to render my page in using the latest standards mode available to the browser the user is using. Is this possible?

我试过包括

<meta http-equiv="X-UA-Compatible" content="IE=edge"/>

在我的页面上,以及更改我的webapp以包含'X-UA-Compatible'HTTP标题的值为'IE = edge',但我似乎无法让它做我想要的。

on my page, as well as altering my webapp to include the 'X-UA-Compatible' HTTP header with value of 'IE=edge', but I can't seem to get it to do what I want.

奇怪的是,如果例如我有两个页面,第一个包含iframe,另一个是iframe中显示的内容,如下所示:

The odd thing is, is that if for instance I have two pages, the first containing the iframe and the other being what's displayed in the iframe, like so:

<!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或以上?

Where has the document mode 8 come from? And how do I make the iframe document into 9 or above??

如果有人能指出我正确的方向,我将永远感激不尽!
谢谢,
尼克

I'd be eternally grateful if someone can point me in the right direction!! thanks, Nick

推荐答案

IE不允许在帧层次结构中混合IE9 +和旧模式。如果您的顶级文档是IE7,那么任何内部文档中可以获得的最高级别是IE8。同样,除了IE9模式页面内的IE9模式文档之外,您将无法托管任何内容。

IE does not allow mixing IE9+ and older modes in a frame hierarchy. If your top document is IE7, the highest you can get in any inner document is IE8. Similarly, you wouldn't be able to host anything but IE9 mode docs inside an IE9 mode page.

这篇关于尝试使用IE = EmulateIE7在页面上的iframe中使用IE = edge X-UA-Compatible的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆