Emulate IE7 for IE8 but not for IE9 using “X-UA-Compatible”?

I just had a play and found the following works for me.

I just had a play and found the following works for me: That is with a comma not a semi colon! You can try it out using this modified copy of John Lascurettes' page (i.e. Emological.Com).

I haven't looked at the spec, but the format is similar to content="IE=7,chrome=1" that works for Chrome Frame. I also found that content="IE=7,9" works but I suspect that is not a correct format. Edit: Beware of a serious problem if your page is in a iframe.

If you use the above in a framed page where the parent is in any mode less than IE9 strict, then IE9 will fall back to IE8 mode (ignoring the IE=7 request! ). Any known workarounds welcome :) The above seems to be a side effect of the by design feature, that iframes (and I presume frames) are either all in IE9 mode, or all are less than IE9 mode.

One can never mix IE9 frames with.

– robocat Dec 17 '10 at 5:13 Yes, it works perfectly. Using comma is vital here. Also, I am not sure about using IE=7 instead of IE=EmulateIE7.

– unclenorton Feb 14 at 13:00 Confirmed that this works on 9.0.8112.16421 (final release). The above take makes IE8 render in IE7 standards mode and IE9 renders in IE9 standards mode. Works with .

For IE7 quirks mode and IE9 standards mode, use . – Rich Apodaca Mar 19 at 16:22.

The dual mode mentioned by someone else should work (but doesn't as shown by Microsoft) and is the closest thing I've seen in MS documentation that should work as described. There's an update below that shows the proper form the meta attribute value should take. So if you use this: Unfortunately, what you will get is IE8 rendering as IE8 because of the fuzzy version vectoring that the x-ua-compatible engine does.

See this document: Defining Document Compatibility: Understanding Content Attribute Values on MSDN. In that section, you'll see that in the first half, they define any version vector defined as larger than the current browser version will be interpreted as the largest available rendering engine. Therefore, emulateIE9 get's translated down to emulateIE8.Stupid.

Then, in the same breath practically, they talk about using multiple version vectors as in the code snippet above to exclude a particular engine. But because of the fuzzy version logic, that would never work. Ah, Microsoft.

Fail again. The reason why using CCs around the meta won't work, is that the browser must have chosen a rendering engine by the time it hits a CC. The x-ua meta must come before anything else in the header except other metas or the title according to MS's own documentation.

If anyone can figure this out, I'm all ears because I'm desperate to exclude IE8 from support while including IE9. IMPORTANT UPDATE: Robocat points out, using a comma instead of a semi-colon as Micrsoft shows is the correct way of doing this. I tested it and it worked for me.

I've updated my test page. So the correct form is this (as suggested by robocat): The incorrect form is this (as suggested by Microsoft).

Thanks for this informative answer. I wish it had the solution, but at least the problem is clearer now. – Rich Apodaca Nov 12 '10 at 22:26 After extensive round and round on testing this, it looks like it does indeed work if emulate is used.At issue is if during testing you've fiddled with any of IE8's Devloper Tools settings for the page.

This is what has led to my long-time confusion. But if I do a fresh load of the test page in a brand new tab, it always loads as expected in IE8 (i.e. , as IE7).

Also, it's important that the values "IE=EmulateIE7; IE=EmulateIE9" are used instead of "IE=7; IE=9" because otherwise IE8 will render as IE8 there. – squareman Nov 29 '10 at 18:42 Hoo boy.Sorry. One more flip flop and I think this if final.

Using multiple values DOES NOT WORK. Sorry, Microsoft, you have failed again. Please see this page: emological.

Com/ie for the full notes. – squareman Nov 29 '10 at 20:31 1 SUCCESS! Thanks to robocat.

YES! Using a comma instead of a semicolon seems to work. I've updated my index page to reflect that.

Stackoverflow. Com/questions/3413629/… – squareman Jan 5 at 23:24 1 Confirmed that this works on 9.0.8112.16421 (final release). For quirks mode IE7, use: – Rich Apodaca Mar 19 at 16:23.

If you want IE 8 to use IE7 standards and IE 9 to use IE9 standards this one worked for me: For IE9 this gives me IE 9 compatibility mode with IE 9 standards. For IE8 this gives me Browser Mode IE8 Document Mode IE7 Standards.

I had to do something like this for an ASP. NET app and the request headers' user-agent property told me what browser it was.

I have so far used all these, nothing works on IE9: this is so frustrating, none of these meta tags seems to be working. Microsoft, What is so difficult in supporting stuff you say should work in your documentation? We have to spend hours doing browser wars.

You are wasting everyone's time.

Apparently on IE we cannot put conditional comments before the X-UA-Compatible. – Deepfreezed May 25 at 18:36.

I think what you need is: according to blogs.msdn.com/b/ie/archive/2010/06/16/i... as it states this as "... an example that combines values so that IE8 renders a webpage in IE7 Standards mode while IE9 renders the webpage in IE9’s Standards mode:" However I for one can't get this to work.

This doesn't work for me. – Rich Apodaca Nov 12 '10 at 22:25.

Wow Microsoft have really created a nightmare here. We're going to be talking about this well into the future! Anyway this works for me.

It doesn't work for me. Can you give your full source? – Rich Apodaca Nov 12 '10 at 22:27 Change the semicolon to comma, should work.

– unclenorton Feb 14 at 13:02 I changed IE=EmulateIE7; IE=IE9 to IE=EmulateIE7; IE=EmulateIE9 – Alex Feb 15 at 1:44.

Does not work. IE8 stays in IE8-mode. I seems like the rendering mode is picked before the conditional comments kick in.

– Urjan Aug 5 '10 at 10:24 5 Indeed, any use of a conditional comment fixes the documentMode so it cannot be changed by a later . – bobince Aug 5 '10 at 10:33 Sorry, I didn't test it. – Sruly Aug 5 '10 at 16:49 1 Any conditional comment in causes emulate modes to not work.

– Rich Apodaca Aug 5 '10 at 22:28 1 @bobince is right. Logic here is obvious -- the browser should already know what it behaves like before the conditional comments can be processed. – unclenorton Aug 5 '10 at 13:04.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions