title: Getting IE and Chrome to load different javascript files
body: <p>I saw this little tip in Stack Overflow on how to get IE (in this case IE10, which does not support conditional HTML) to load a different JavaScript file.</p>
  
  <p><a href="https://stackoverflow.com/questions/17125660/getting-ie-to-load-a-different-js-file">Getting IE to load a different js file</a></p>
  
  <p>However, in my case this hack is working for FireFox and IE, but not for Chrome. I suspect it is because my test is in the header. Is that True?</p>
  
  <p>Should I be looking at something less declarative, and imperative like jquery getScript()?</p>
  
  <p>(Chrome is not loading PouchDB-nightly.js)</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Map DownLoader - V1.2&lt;/title&gt;
      &lt;script src="../Kendo/jquery.1.9.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="../Kendo/kendo.all.js"&gt;&lt;/script&gt;
      &lt;script src="xhr2lib.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          var ie = !(navigator.userAgent.indexOf("MSIE") &lt; 0);
          if (ie == false) {
              document.write("&lt;script src=\"../PouchDB/pouchdb-nightly.js\"&gt;&lt;/scr" + "ipt&gt;");
          } else {
              document.write("&lt;script src=\"../PouchDB/pouchdb-nightly-IE.js\"&gt;&lt;/scr" + "ipt&gt;");
          }
      &lt;/script&gt;
  &lt;!--    &lt;script src="../PouchDB/pouchdb-nightly.js"&gt;&lt;/script&gt;--&gt;
      &lt;script src="VM.js"&gt;&lt;/script&gt;
      &lt;script src="LayerChooser.js"&gt;&lt;/script&gt;
      &lt;script src="Downloader.js"&gt;&lt;/script&gt;
      &lt;link href="../Kendo/styles/kendo.common.min.css" rel="stylesheet" /&gt;
      &lt;link href="../Kendo/styles/kendo.metroblack.min.css" rel="stylesheet" /&gt;
      &lt;link href="../Kendo/styles/kendo.dataviz.metroblack.min.css" rel="stylesheet" /&gt;
      &lt;link href="../Styles/ButtonStyles.css" rel="stylesheet" /&gt;
      &lt;link href="../Styles/DownloadStyle.css" rel="stylesheet" /&gt;
  &lt;/head&gt;
  </code></pre>