开发者

Force parent window of iFrame into Compatability mode without access?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜