2

I've been looking at "IE mode" within Edge Chromium.

Everything I have currently runs in IE 11.

If in IE mode, do you know if the window.navigator... javascript stuff to detect browser, version, etc still returns IE 11 in "IE mode"?

What I have researched indicates "IE mode" is actual IE 11 launching in an Edge window (and there is a policy option to launch IE 11 standalone).

The Document mode link suggested below is before this point...the code already has the check for window.navigator.UserAgent....etc. I'm seeing if anybody knows if that will return IE stuff for "IE mode" within Edge.

thank you so much.

4
  • Welcome to Stack Overflow! Please visit the help center, take the tour to see what and How to Ask. Do some research, search for related topics on SO; if you get stuck, post a minimal reproducible example of your attempt, noting input and expected output using the [<>] snippet editor.
    – mplungjan
    Commented Feb 25, 2021 at 15:14
  • Does this answer your question? How to get browser "Document Mode"
    – MrUpsidown
    Commented Feb 25, 2021 at 15:16
  • 1
    This seems like something that would be easy enough to try on your own. Get a copy of Edge Chromium, send the appropriate headers to trigger IE mode, open a console, check the values. Commented Feb 25, 2021 at 15:18
  • Yeah, unfortunately, it seems all the "IE mode" toggles have been removed from Edge and the only way to get "IE Mode" is with policy. I don't have any admin access and have to work via third party in desktiop support. I am trying to anticipate the problems...
    – Don Holmes
    Commented Feb 25, 2021 at 15:25

2 Answers 2

3

You had asked,"If in IE mode, do you know if the window.navigator... javascript stuff to detect browser, version, etc still returns IE 11 in "IE mode"?"

Tested code:

<!doctype html>
<html>
<head>
<title>
Test to detect IE browser
</title>

</head>
<body >
<div id="info"></div><br>
<h2>Test Page...</h2>

<script>
function Detect_IE() {
           var ua = window.navigator.userAgent;
         
           var msie = ua.indexOf('MSIE ');
           if (msie > 0) {
            
             return "IE " + parseInt( ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
           }
         
           var trident = ua.indexOf('Trident/');
           if (trident > 0) {
            
             var rv = ua.indexOf('rv:');
             return "IE " + parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
           }

           // other browser
           return "false";
         }
         var result=Detect_IE();
         if (result=="false")
         {
            document.getElementById("info").innerHTML +="<h2>Welcome to the site...</h2>";
         }
         else
         {
          document.getElementById("info").innerHTML += "<h2>Dear user you are using " + result + " <br><br> User Agent String = " + window.navigator.userAgent + "</h2>";
         }
</script>
</body>
</html>

Test result with the MS Edge 88.0.705.74 in the IE mode:

enter image description here

7
  • Thanks so much for running that test for me. I so appreciate it.
    – Don Holmes
    Commented Mar 3, 2021 at 17:51
  • If the suggestion is helpful, I suggest you accept it as an answer to this question. It can help other community members in the future with similar kinds of questions. Please see here. Thanks for your understanding. Commented Mar 4, 2021 at 1:14
  • One more question, per MS documentation, IE Mode enables ActiveX. Does this include all ActiveX? In IE 11, I have to explicitly Enable "Initialize and script ActiveX controls not marked as safe for scripting" in Internet Options. This allows for script interaction with Ms Office (Word and Excel) and IBM Notes DOMs. Since IE Mode in Edge requires a policy with an Enterprise Site List, is all ActiveX enabled in IE Mode? There's no way in Edge IE mode to explicitly enable ActiveX controls "not marked as safe". Thank you very much.
    – Don Holmes
    Commented Mar 5, 2021 at 14:33
  • IE mode will use the actual IE browser, so I think you can try to enable Initialize and script ActiveX controls not marked as safe for scripting in Internet Options. It should also apply to the IE mode. Commented Mar 8, 2021 at 7:28
  • As I informed you can enable Initialize and script ActiveX controls not marked as safe for scripting in Internet Options. If it is enabled there then the same settings will apply to the IE mode. Commented Mar 11, 2021 at 7:30
0

Ok, thank you. I also found out that Internet Options in Win 10 is in Control Panel (not exclusive to IE). It looks to be the IE options interface but in a more generalized scope (so if you have IE Mode within Edge window, these should apply). It appears that zone-specific stuff like Initialize and script ActiveX controls not marked as safe for scripting can be set here. I tested these out and they do apply to IE

Not the answer you're looking for? Browse other questions tagged or ask your own question.