title: ie vs chrome window.location.href and <base> tag
body: <p>I have a problem with redirecting with javascript to a different page upon the click on a <code>&lt;td&gt;</code>.  For my websites I use the <code>&lt;base href=""&gt;</code> tag as a starting point for my links.  </p>
  
  <p>So consider this code:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;&lt;head&gt;
      &lt;meta charset="utf-8"/&gt;
  &lt;title&gt;Login&lt;/title&gt;
  &lt;base href="http://www.mysite.com/MyWebsite/manage/" /&gt;
  </code></pre>
  
  <p>special reference to <code>&lt;base href="http://www.mysite.com/MyWebsite/manage/" /&gt;</code></p>
  
  <p>and consider this jQuery:</p>
  
  <pre><code>//Set row clicking
      $('table#alerts_table').on("click", "td", function () {
          var alert_id = $(this).closest('tr').find('input[type=checkbox]').val();
          var href = 'alerts/alert.php?id=' + alert_id;
          if (href) { window.location.href = href; }
      });
  </code></pre>
  
  <p>special reference to </p>
  
  <pre><code>var href = 'alerts/alert.php?id=' + alert_id;
  if (href) { window.location.href = href; }
  </code></pre>
  
  <p>and consider that my current position on the website is already in the folder called alerts as follows:
  <a href="http://www.mysite.com/MyWebsite/manage/" rel="nofollow">http://www.mysite.com/MyWebsite/manage/</a><strong>alerts</strong>/index.php</p>
  
  <p>I want to move from index.php to alert.php.</p>
  
  <p>On chrome all works as expected i.e. the base href <code>http://www.mysite.com/MyWebsite/manage/</code> is concatenated to <code>alerts/alert.php?id=1</code> and I am redirected accordingly.</p>
  
  <p>However in IE
  the folder alerts is doubled: <a href="http://www.mysite.com/MyWebsite/manage/" rel="nofollow">http://www.mysite.com/MyWebsite/manage/</a><strong>alerts/alerts</strong>/alert.php?id=1</p>
  
  <p>This means that it is not taking the base URL from the base tag but it is using relative paths.</p>
  
  <p>Any ideas?</p>