title: window.location not refreshing to the existing URL
body: <p>I have a PHP page with implementation of jQuery horizontal tabs. I have added a jQuery script so that the page URL reflects the tab#. I have a form on the page and upon form submission I need to refresh and stay on this same page to include the jQuery correct tab number.</p>
  
  <p>This is the code to add the jQuery tab number to the URL:</p>
  
  
  
  <pre><code>&lt;script&gt;
  jQuery(function($) {
  
      $("&lt;p&gt;").html("Loaded at " + new Date()).appendTo(
          document.body
      );
      showTab(location.hash || "#tabs-1");
  
      $("#nav a").click(function() {
          var hash = this.getAttribute("href");
          if (hash.substring(0, 1) === "#") {
              hash = hash.substring(1);
          }
          location.hash = hash;
          showTab(hash);
          return false;
      });
  
      function showTab(hash) {
          $("div.tab").hide();
          $("#tab-" + hash).show();
      }
  
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>The full URL of the page is <a href="http://somedomain.com/includes/nonadmin_user_profile.php#tabs-5" rel="nofollow">http://somedomain.com/includes/nonadmin_user_profile.php#tabs-5</a> and includes the tab number for the jQuery horizontal tab.</p>
  
  <p>I am using this script to refresh and stay on the same page: <code>echo "&lt;script&gt;window.location=window.location&lt;/script&gt;";</code></p>
  
  <p>On refresh here is the problem as it lands at this URL which does not include the tab number. <a href="http://somedomain.com/includes/nonadmin_user_profile.php" rel="nofollow">http://somedomain.com/includes/nonadmin_user_profile.php</a></p>
  
  <p>Any suggestions would be appreciated very much.</p>
  
  <p>Here is another detail: The problem described above does not occur if I merely refresh the page with the browser refresh button or if I right click the page and refresh. In this instance the page refreshes and stays on the full url with the tab#. </p>