0

Testing my website on live implementation and hosted on localhost act differently from each other. When run on web version it goes into this code:

<!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->

even when though I am running IE11 and

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

is in the head portion directly after the head tag.

The F12 Emulation Document mode claims that 8 is the default (Via X-UA-compatible meta tag) regardless of the line being there or not. This behavior does not happen on my localhost which runs as intended with Edge being the default (also stating 'Via X-UA-compatible meta tag).

  • Console flags 'HTML1122: Internet Explorer is running in Enterprise Mode emulating IE8.' – Todd Landis Jul 02 '15 at 14:47
  • Did you also check if the affected site is considered to be in the "Intranet" zone and the flag "Display intranet sites in Compatibility View" is active? – Filburt Jul 02 '15 at 14:49
  • @Filburt How do I check if it is Intranet or not? and the site does the same thing regardless of being in 'Compatibility mode' or not. – Todd Landis Jul 02 '15 at 14:51
  • It will show the according zone tab when you open "Internet Options -> Security". It's just a thing to check if your F12 Emulation Doc mode tells you it is something below 9 and doesn't allow you to change to a higher mode. – Filburt Jul 02 '15 at 14:56
  • @Filburt The site is Local intranet with Medium-Low security level. Protection mode is disabled too. – Todd Landis Jul 02 '15 at 14:59

2 Answers2

0

How are you detecting the versions. You may want to create a javascript function that help you identify the version exemple:

function getInternetExplorerVersion()
{
  var rv = -1;
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  else if (navigator.appName == 'Netscape')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}

Reference

Then after call in your script for the versions.

Community
  • 1
  • 1
Filipe Ferreira
  • 320
  • 2
  • 21
0

SOLVED:

The problem was that Enterprise Mode was overriding

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

The fix to this problem is to go into the registry editor from the start menu, navigate to

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\EnterpriseMode 

and delete the SiteList value thus disabling Enterpirse Mode.

REFERENCE: https://msdn.microsoft.com/en-us/library/dn640688.aspx