IE 11 - Is there a way to verify, enable or disable enterprise mode?

I do not know how to solve this problem in Javascript or HTML. I have clients who are currently using web applications built for ie9 and below. These legacy applications do not work well in IE11. IT solutions were to enable enterprise mode. The Enterprise mode was designed to avoid "general compatibility issues associated with web applications written and tested in older versions of Internet Explorer."

See: http://www.eightforums.com/tutorials/43972-ie11-enterprise-mode-enable-disable-users.html

Enabling enterprise mode seems problematic in a web application written using Bootstrap and AngularJS. That is, responsiveness does not work at all if the enterprise mode is not disabled. Not only AngularJS and Bootstrap, but also other libraries.

The solution I'm looking for is a way to check the status of enterprise mode through javascript, and then tell users that they enable or disable the mode. It is better if it can be automatically turned on / off via JS or HTML attributes.

Snooping in the document.x and window.x objects, I do not see any properties that we would give me an indication that the enterprise mode is on. Any suggestion?

Repro (s):

  • IE11> Developer Tool> Console> Type Window
  • IE11> Developer Tool> Console> Document Type
+6
source share
3 answers

There is no DOM property that indicates that you are using EMIE. The whole idea of ​​EMIE is to emulate IE8 behavior better than IE8 document mode, emulate IE8 behavior. EMIE should be used only in specific cases when it is necessary; It cannot be used in bulk.

In some cases, EMIE can be detected. If you carefully look at the list of user agent strings for the last couple of releases, you can see the difference between EMIE on IE11 and the user agent string for RTM for IE11.

However, before accepting this as your magic bullet, there are two caveats:

  • You cannot disable EMIE programmatically. This is only a local configuration change .

  • The user agent for IE11 today is completely different than when IE11 was released. Based on the reports from the IE command, the UA string will be more complex , especially after β€œIE Spartan” (or whatever they choose name it β€œ) gets into the wire.

My recommendation? Create a small launch page that performs simple function detection for the web application in question. If you find features compatible with what is needed for the application, then display a link to launch the application. If feature detection cannot detect IE8, IE11, or any other version that you are targeting, display a warning with a link to additional troubleshooting information. Be sure to include the launch link, just in case.

Thus, the user has the information they need, and you have an easy way to deal with a problem that does not require too many updates for the application in question.

Hope this helps ...

- Lance

+5
source

In my opinion, the cause of the problem is that IE 11 Enterprise mode emulates IE 8. But bootstrap does not support IE 8. To overcome this, just use HTML5 shim and Respond.js, as described here .

<script src="js/respond.min.js"></script> <script src="js/html5shiv.min.js"></script> 

But without checking how <!--[if lt IE 9]> - because it seems that it does not work in corporate mode.

The best solution would be not only to mention the mentioned scenarios without conditions, but also to find a suitable condition instead of <IE 9.

To fix the problem with angles, simply use the following meta tag:

 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
+2
source

For those who also struggled with this problem. I sent a feature request to MS IE Team.

See: https://connect.microsoft.com/IE/feedback/details/1159543/need-a-way-for-client-side-codes-to-detect-enterprises-mode

My solution is a workaround that involves checking the width of the div container. Enterprise mode does not support responsiveness.

+1
source

Source: https://habr.com/ru/post/983235/


All Articles