开发者

Force parent window of iFrame into Compatability mode without access?

开发者 https://www.devze.com 2023-03-21 07:59 出处:网络
Faceb开发者_如何学JAVAook is having allot of JavaScript issues at the moment in Internet Explorer (IE 9),however by clicking the IE 8 Compatibility Mode button, or by switching to IE 8 Compatibility v

Faceb开发者_如何学JAVAook is having allot of JavaScript issues at the moment in Internet Explorer (IE 9), however by clicking the IE 8 Compatibility Mode button, or by switching to IE 8 Compatibility via the Developer tools you can get rid of all the JavaScript errors.

My apps are using the newer iFrame method, I have tried the following tags:

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

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

Neither seemed to switch the parent frame into the correct mode (document.documentMode != 8), is there a way to force IE 9 into Compatibility mode for the whole site (facebook.com) from within a iFrame either via JavaScript or some undocumented method?


Not unless you have control of the site.


You can have a look at compatilbility-view

In a web application where I had access to the server, I added a custom HTTPHeader entry for the target web site:

Custom Header name: X-UA-Compatible
Custom Header value:  IE=EmulateIE7

In order to force IE8 to behave like IE7, and it worked well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号