I am quite confused. I should be able to set
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
and IE8 and IE9 should render the page using the latest rendering engine. However, I just tested it, and if Compatibility Mode is turned on elsewhere on our site, it will stay on for our page, even though we should be forcing it not to.
How are you supposed to make sure IE does not use Compatibility Mode (even in an intranet)?
FWIW, I am using the HTML5 DocType declaration (<!doctype html>
).
Here are the first few lines of the page:
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="innerpage no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="innerpage no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="innerpage no-js ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en" class="innerpage no-js">
<!--<![endif]-->
<head>
<meta charset="ISO-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
EDIT: I just learned that the default setting on IE8 is to use IE7 compatibility mode for intranet sites. Would this override the X-UA-Compatible meta tag?
I added the following to my htaccess file, which did the trick:
As it turns out, this has to do with Microsoft's "intelligent" choice to make all intranet sites force to compatibility mode, even if
X-UA-Compatible
is set toIE=edge
.For Nginx,
ref : https://github.com/h5bp/server-configs/commit/a5b0a8f736d68f7de27cdcb202e32975a74bd2c5
I had the same issue after trying many combination I had this working note I have compatibility checked for intranet
X-UA-Compatible
will only override the Document Mode, not the Browser Mode, and will not work for all intranet sites; if this is your case, the best solution is to disable "Display intranet sites in Compatibility View" and set a group policy setting to specify which intranet sites need compatibility mode.Timmy Franks had it right for me. We just had the issue today where the client had IE8 company-wide, and it was forcing the site we wrote for their intranet into compatibility mode. Setting "IE-Edge" seemed to fix it.