문제

If I serve a page using

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

using HTML 4.01 strict, and load this page into IE 8, then the IE 8's Developer Tools shows that it is using:

Browser Mode: IE 8     Document Mode: IE 7 Standards

Well then, is IE 8 using partly IE 8 engine and partly IE 7 engine? Which part is IE 8 and which part is IE 7?

HTTP_USER_AGENT is showing as:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

so I'd imagine it is not "totally" IE 7.

도움이 되었습니까?

해결책

Due to the meta tag telling IE8 to emulate IE7, the layout engine (the browser component used to render pages) is changed to mimic that of IE7. Ergo, Document Mode shows up as IE7 standards mode.

Since IE8 is relying on the meta tag to determine how to render a page, I'm guessing IE8 isn't set to use Compatibility View for it. With that, the browser mode shows up as IE8 and the user-agent string it sends is also IE8's.

So to recap: the rest of the browser is still IE8; only the layout engine acts as IE7's.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top