views:

35

answers:

1

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.

A: 

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.

BoltClock
I thought on the Developer Tools, the user being able to change them means that we can force it to use that mode and disregard the IE=EmulateIE7 ?
動靜能量
Yes, but Developer Tools are mostly used by developers anyway, and we force those modes to test and debug. Users don't usually see or use that feature.
BoltClock