title: Legacy code to create XMLHttpRequest still valid?
body: <p>For years I am using the same code snippet to create the <code>XMLHttpRequest</code> object:</p>
  
  <pre><code>var tReq = (function () {
      var tAn;
      if (window.XMLHttpRequest) {
          tAn = new XMLHttpRequest();
      } else if (window.ActiveXObject) try {
          tAn = new ActiveXObject("MSXML2.XMLHTTP");
      } catch (ex) {
          tAn = new ActiveXObject("Microsoft.XMLHTTP");
      }
      return tAn;
  }());
  </code></pre>
  
  <p>I have been using that code for so long that I do not know if it is still up to date.</p>
  
  <p>Does this code still create the <code>XMLHttpRequest</code> in every browser or is there a more efficient solution nowadays (<strong><em>not</em></strong> asking for jQuery)?</p>