javascript - IE - Prevent compatibility mode in an Iframe - Stack Overflow

Is it possible to disable the IE patibility mode from within an Iframe?If I use the following meta in t

Is it possible to disable the IE patibility mode from within an Iframe?

If I use the following meta in the iframe html, this not working:

<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />

Is it possible to disable the IE patibility mode from within an Iframe?

If I use the following meta in the iframe html, this not working:

<meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
Share Improve this question edited May 1, 2015 at 16:01 jbutler483 24.6k11 gold badges100 silver badges148 bronze badges asked May 1, 2015 at 15:48 Below the RadarBelow the Radar 7,63511 gold badges69 silver badges145 bronze badges 2
  • possible duplicate of Force parent window of iFrame into Compatability mode without access? – André Dion Commented May 1, 2015 at 16:21
  • It's the same problem: "I want to <do something> to the document including me via an iframe" with the same answer: You cannot do that unless you own the document that contains the iframe. – André Dion Commented May 1, 2015 at 16:25
Add a ment  | 

1 Answer 1

Reset to default 4

It depends on if you have access to the x-ua-patible meta of the host (parent). When the host page is at IE9 mode or above, its state is imposed on the iframe. Here's a good explanation, given by a moderator at MS-Connect.

https://connect.microsoft./IE/feedback/details/1047106/when-webpage-emulates-ie-5-embedded-iframe-shows-ie-8


Here's supplemental info about how Quirks mode forked two ways beginning with IE10.

https://msdn.microsoft./library/hh869300(v=vs.85).aspx


Here's a live demo which allows changing the IE modes on-the-fly.
It was patched to also allow selecting the iframe url.

https://googledrive./host/0B8BLd2qPPV7XfnZQRk1JSkg5cFVMbGI1QkZVclVBbUtWZnV2bmczUHpSaVJmSXBOdUg2ek0/toggle-IE-pat-and-quirks-modes.html

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745210922a4616834.html

相关推荐

  • javascript - IE - Prevent compatibility mode in an Iframe - Stack Overflow

    Is it possible to disable the IE patibility mode from within an Iframe?If I use the following meta in t

    4小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信