title: How to redirect to multiple url's using from javascript?
body: <p>I have a requirement to clear the cookies and to redirect to a new url after clicking on a link. I wrote the below code which calls "logOffRedirectUrlForCookieDeletion" which is responsible to clear the cookies and redirect the application to the homepage and "myUrlAfterCookirDeletion" is the new url that needs to be redirected from the homepage after cookie deletion. If I use any one of the "window.location.href" statements, my code works absolutely fine but if I use two "window.location.href" statements only the second one is getting executed. Can someone please suggest me how to use 2 url redirection using window.location.href  </p>
  
  <pre><code>ClearCookiesAndRedirect:function(redirectURL){
           if (confirm("Do you want to leave the website?") == true) {  
                  window.location.href = logOffRedirectUrlForCookieDeletion;
                  window.location.href = "myUrlAfterCookirDeletion";
  
              } else {
                 return;
              }   
      },
  </code></pre>