0

In the header of my website I have the following meta tag:

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

As I understand it, IE=edge will tell IE to view the webpage in the highest mode that the browser is capable of displaying. So if the visitor is using IE9 it will display the page with IE9 standards.

I just recently had somebody send me a screen shot of our website using IE9 because the site is not displaying correctly and the settings are: Browser Mode: IE9 and Document Mode: IE7 Standards. I've been unable to recreate the display issues on my end and have not had any other complaints. I'm not sure why IE is using IE7 standards for the document mode.

Is there a reason why IE would use IE7 standards for the Document mode? IE=edge wouldn't be to blame for this would it?

Edit:

This is what I currently have in my header, could IE be ignoring the meta tag:

<!doctype html>  

<!--[if IEMobile 7 ]> <html <?php language_attributes(); ?>class="no-js iem7"> <![endif]-->
<!--[if lt IE 7 ]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html <?php language_attributes(); ?> class="no-js"><!--<![endif]-->

    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
brandozz
  • 1,059
  • 6
  • 20
  • 38
  • Most like likely the [Compatibility View Settings](http://stackoverflow.com/questions/13284083/ie10-renders-in-ie7-mode-how-to-force-standards-mode) set to IE7 mode . – Teemu May 12 '15 at 16:50
  • In the link that you provided is says that if there is too much info before the meta tag that IE may ignore it. I've added what I currently have in my header above. Could this be the case? – brandozz May 12 '15 at 17:26
  • Yes, that also defines the document type before the x-ua meta is parsed. The meta tag works only, when there isn't anything (like scripts, styles (also linked) etc.) which could define the document type before the said tag. – Teemu May 12 '15 at 18:11
  • @Teemu - So move those conditional statements to appear after the x-ua meta tag? – brandozz May 12 '15 at 18:31

1 Answers1

1

Let me further provide more information on the case of how Compatibility View settings would set the document mode to IE7.

As explicitly mentioned in the Internet Explorer Standards Support Documentation: https://msdn.microsoft.com/en-us/library/ff405771(v=vs.85).aspx

Compatibility View settings can also impact the document mode selection:

  • If a webpage is retrieved from a website in the Local intranet zone, IE7 mode is used.

  • If the webpage is retrieved from a site in a domain on the Compatibility View list (and the list is active), IE7 mode is used

So either one of this is true for your situation

securecodeninja
  • 2,497
  • 3
  • 16
  • 22
  • thanks for the article. I originally thought that the icon was blue because there were potential display issues and IE was recommending that the site be added to the compatibility view list. I believe you are correct, this seems to be a situation where the site was already in the compatibility view list and should be removed. – brandozz May 15 '15 at 21:08