1

Is there any way to detect Internet Explorer 11 Enterprise mode pragmatically?

Pragmatically means at server side in csharp or in javascript/jquery.

Following thread is still not conclusive

IE 11 - Is there a way to check then enable / disable enterprise mode?

Community
  • 1
  • 1
  • 1
    Possible duplicate of [IE 11 - Is there a way to check then enable / disable enterprise mode?](http://stackoverflow.com/questions/28818733/ie-11-is-there-a-way-to-check-then-enable-disable-enterprise-mode) – Asons Oct 15 '15 at 09:38

2 Answers2

0

Sending X-UA-Compatible HTTP Header or use a META tag in your page's HEAD will kick IE into a compatibility mode. So not doing so will let it run in normal mode.

If you want to test if the browser is compatible I would write an jQuery AJAX call that tries to use a javascript function that isn't working in older IE inside a try catch and POST the result to your application.

for example trim() doesn't work in IE8

var str = "       Hello World!        ";
var a = (str.trim());
if(a == "Hello World!"){
  //Ajax Post true
} else {
  //Ajax Post false
}

This should work because if enterprise mode is activated it will work inside IE8

http://blogs.msdn.com/b/ie/archive/2015/03/02/making-it-easier-for-enterprise-customers-to-upgrade-to-internet-explorer-11-and-windows-10.aspx

Community
  • 1
  • 1
online Thomas
  • 8,864
  • 6
  • 44
  • 85
  • Although this may or may not solve OPs actual (possible XY) problem. It does not answer the question as it currently stands – PeeHaa Oct 15 '15 at 09:35
0

You can verify the User Agent string Get the user agent string with Javascript : navigator.userAgent;

For IE11 Enterprise Mode on desktop the User agent string will be

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Tablet PC 2.0)

Refer https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx

Rolwin Crasta
  • 4,219
  • 3
  • 35
  • 45
  • The user agent string has changed since the release of IE11 so this not recommended as a detection method. Read more here: http://stackoverflow.com/questions/28818733/ie-11-is-there-a-way-to-check-then-enable-disable-enterprise-mode – Asons Oct 15 '15 at 09:43
  • Given the above user agent, how can we know it is not IE8? – Charles McKelvey Oct 03 '16 at 19:21