title: JavaScript Returning Previous Value Immediately after Changing the Value
body: <p>I have a single html document that simulates many pages by modifying the content and url as users click through the page.</p>
  <p>In my JavaScript there is a place I use <code>history.back()</code>. This works as expected changing the url and content (even though the user really stays on the same html document). However, immediately after I use <code>history.back()</code> I try to get the users new <code>window.location</code>. This is still showing the previous url instead of the new one.</p>
  <p>Do I need to force some type of update, refresh, calculation, garbage collection or something in-between those two lines of code so I get the new url?</p>