title: window.location.replace not working on localhost
body: <p>I want to navigate to a URL on my site. This is what I have:</p>
  <pre><code>var TheDemoURL = window.location.host;
  
  if (SomeCondition1) { TheDemoURL = TheDemoURL + '/fr/demo'; }
  if (SomeCondition2) { TheDemoURL = TheDemoURL + '/de/demo'; }
  ...
  
  window.location.replace(TheDemoURL);
  </code></pre>
  <p>Initially, in the variable watch, I have <code>TheDemoURL: &quot;localhost:49173&quot;</code> and when I alert the final <code>TheDemoURL</code> is looks a good URL but in reality nothing happens.</p>
  <p>Why is this not working?</p>