title: window.location redirect works, but original URL not showing up in browser history
body: <p>The code below works well. Here is my problem: The window url redirects, but the original url is not logged in my browser history.</p>
  
  <p>For example, if I visit "http://example.com/page1", the browser redirects to "http://example.com/test", as it should. However, I need the original url visited ("http://example.com/page1") to show up in my browser history so that I can call upon it in a different function.</p>
  
  <p>Is there anyway to get the original url visited to log in my browser's history before redirecting?</p>
  
  <pre><code>&lt;!-- script to enable age verification cookies and ensure people have age checked --&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
         if (window.location =="http://example.com/home") {//do nothing
         } else {
             window.location = "http://example.com/test";
         }
      });
  &lt;/script&gt;
  </code></pre>