1

Possible Duplicate:
Override intranet compatibility mode IE8

Although I'm specifying

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

But due to IE's "Display intranet sites in Compatibility View" setting, my app isn't being viewed in IE8, but in compatibility mode.

Anyone know if there is a way round this???

Community
  • 1
  • 1
GordonB
  • 1,789
  • 5
  • 24
  • 48
  • V. Similar; http://stackoverflow.com/questions/2742853/force-internet-explorer-8-browser-mode-in-intranet/2755739#2755739 – GordonB Jun 28 '10 at 16:03
  • msdn forum question, no helpful answers : http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/acf1e236-715b-4feb-8132-f88e8b6652c5/ – GordonB Jun 29 '10 at 09:59
  • According to the lastest post on the forum that GordonB linked to, `X-UA-Compatible` does work on Intranet sites, but only when it's issued as an HTTP header, not as a meta tag. – TRiG Jul 27 '10 at 12:17
  • TRiG : Tried setting it in IIS already. Doesn't work. – GordonB Aug 09 '10 at 09:50

1 Answers1

1

This will help you.

if (window.navigator.appName == "Microsoft Internet Explorer"){
    // This is an IE browser. What mode is the engine in?
    if (document.documentMode==8) // IE8
    {
        alert('IE8')
    }
    else
    {
        alert('Not IE8 or in Compatibilty mode');
    }
}

according to false status (not IE8 or in Compatibilty mode) you can redirect the user to a page that says how to set his/her browser. I wonder to know if there is an automatic script to do this?

Kevin DiTraglia
  • 24,092
  • 16
  • 88
  • 134
Serjik
  • 9,013
  • 6
  • 57
  • 65