title: Javascript redirect that breaks back button
body: <p>According to many answers on StackOverflow with <code>location.replace(URL)</code> you could redirect your user while keeping the page in the back button history.</p>
  
  <p>I'd like to do the opposite, so I'm using <code>location.href = URL</code> but I'm still experiencing the correct working of the back button: why is this?</p>
  
  <p>Also, using <code>location.replace()</code> in Chrome and IE10 seems to leave the back button intact as well. Please note that I'm not redirecting with <code>location.replace("http://...")</code> but with <code>location.replace("/page.html")</code></p>
  
  <p>I want to redirect my user from a page to a configuration wizard, while inside the wizard the user should not be able to go back and forth between the pages: instead, pressing "back" should redirect it to the original page, outside the wizard.</p>
  
  <p>One solution would be to load the pages of the wizard via AJAX and inject them with <a href="http://api.jquery.com/html/" rel="nofollow"><code>.html()</code></a>. We've already developed most of our web app pages this way but for this particular part the AJAX solution has been neglected by server side developers (go figure!).</p>
  
  <p>What can I do?</p>