Detect IE 11 in XPages


function isIE11() {
  var isBrowserIE11 = false;
     
  if (context.getUserAgent().getBrowser() == 'Unknown') {
    var userAgent = context.getUserAgent().getUserAgent();
    if (userAgent.indexOf('Trident/7') > -1 && userAgent.indexOf('rv:11') > -1) {
      isBrowserIE11 = true;
    }
  } 
  
  return isBrowserIE11;
}
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
2 comment(s)Login first to comment...
jeniffer homes
(at 07:50 on 19.12.2015)
Built-in methods of the XSPUserAgent class in XPages do not recognize IE 11
Anonymous
(at 07:48 on 19.12.2015)
The isIE() method will return false. The getBrowser() method will return 'Unknown'.