title: How to detect IE11?
body: <p>When I want to detect IE I use this code:</p>
  
  <pre><code>function getInternetExplorerVersion()
  {
    var rv = -1;
    if (navigator.appName == 'Microsoft Internet Explorer')
    {
      var ua = navigator.userAgent;
      var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
      if (re.exec(ua) != null)
        rv = parseFloat( RegExp.$1 );
    }
    return rv;
  }
  function checkVersion()
  {
    var msg = "You're not using Internet Explorer.";
    var ver = getInternetExplorerVersion();
  
    if ( ver &gt; -1 )
    {
      msg = "You are using IE " + ver;
    }
    alert( msg );
  }
  </code></pre>
  
  <p>But IE11 is returning "You're not using Internet Explorer". How can I detect it?</p>