title: JavaScript equivalent of hitting the browser refresh button
body: <p>I am adding functionality to a legacy web application such that in certain circumstances we will log the user off, returning them to a logon page that is separate to our application.</p>
  
  <p>The application is part classic ASP, part ASP.NET and uses an external company-wide authentication mechanism. </p>
  
  <p>We can achieve the desired effect (experimentally) by clearing session cookies in the browser and hitting the browser refresh button. The underlying authentication mechanism redirects the user to the logon page and when they enter their credentials they get directed back to the page they were originally on.</p>
  
  <p>We are currently using the following approach...</p>
  
  <pre><code>function logoffUser() {
      $.cookie("ASP.NET_SessionId", null);
      $.cookie("ASPSESSIONKEY", null);
      $.cookie("CompanyFormsAuth", null);
      window.location.reload(true);
  }
  </code></pre>
  
  <p>This works, insofar as the user gets bounced back to the external logon page. However the address shown in the browser address bar does not get updated, and when they logon they end up on our application's home page.</p>
  
  <p>So the fundamental question is: Is there a JavaScript equivalent to hitting the browser refresh button?</p>