Force IE9 into browser compatibility view

F.P picture F.P · Jul 17, 2012 · Viewed 26.3k times · Source

I am aware of how to force IE into viewing a page in document compatibility, but what about browser compatibility view?

I have a project that only works when IE9 is in browser compatibility view for various reasons, yet I can't find any resources on how to force IE9 to do so.

Everyone only talks about forcing the document compatibility, e.g. using

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

But that doesn't work in my case, because it only sets the document view. Is there a way to set the browser view, too?

PS: To make it abundantly clear, this is the setting I need to enforce:

Browser Compatibility

Answer

Razor picture Razor · Jul 17, 2012

See MSDN documentation.
You should use emulateIE7 since compatibility mode is kind of IE7:

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

Edit

If the above does not work, the other options are really poor.
Quoting from the link above:

  • Microsoft has not placed the domain name of the site on a blacklist. (blacklist linked in original article is very old and not being updated, you can find a local copy on your computer)
  • An intranet admin has not placed the site on a blacklist.
  • The user has not pressed the Compatibility View button (duh)
  • The site is not in the intranet zone
  • The page is not framed by a Compatibility Mode page.

The above are, AFAIK, the only causes for compatibility mode.
Unless you are prepared to contact Microsoft directly to have your website added to the global blacklist, there isn't much you can do (unless you want to wrap your site in a frame that originates from a blacklisted domain).