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.

Don Holmes
  • 23
  • 2
  • 7
  • Welcome to Stack Overflow! Please visit the [help], take the [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output using the `[<>]` snippet editor. – mplungjan Feb 25 '21 at 15:14
  • Does this answer your question? [How to get browser "Document Mode"](https://stackoverflow.com/questions/13121016/how-to-get-browser-document-mode) – MrUpsidown Feb 25 '21 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. – Heretic Monkey Feb 25 '21 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 Feb 25 '21 at 15:25

2 Answers2

2

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

Deepak-MSFT
  • 10,379
  • 1
  • 12
  • 19
  • Thanks so much for running that test for me. I so appreciate it. – Don Holmes Mar 03 '21 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](https://stackoverflow.com/help/someone-answers). Thanks for your understanding. – Deepak-MSFT Mar 04 '21 at 01: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 Mar 05 '21 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. – Deepak-MSFT Mar 08 '21 at 07: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. – Deepak-MSFT Mar 11 '21 at 07:30
  • Hey, thanks.,So if IE mode is set to open in Edge Window, this would require launching IE standalone to enable the setting? Would this also apply to the Local Intranet zone...trusted sites settings? Those are currently set as policy. – Don Holmes Mar 11 '21 at 15:06
  • You need to configure the [Enterprise mode site list](https://learn.microsoft.com/en-us/deployedge/edge-ie-mode-sitelist) and need to set this file into [Configure sites on the Enterprise Site list policy](https://learn.microsoft.com/en-us/deployedge/edge-ie-mode-policies#configure-using-the-configure-the-enterprise-mode-site-list-policy). The site mentioned in the sitelist.xml file will automatically get launched in IE or Edge as per the configuration in the sitelist.xml file. – Deepak-MSFT Mar 12 '21 at 01:33
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

Don Holmes
  • 23
  • 2
  • 7