jQuery Redirect

How can I make a redirect page using jQuery?

jQuery is not necessary, and window.location.replace(…) will best simulate an HTTP redirect.It is better than using window.location.href =, because replace() does not put the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco. If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace. For example:// similar behavior as an HTTP redirect window.location.replace(“http://stackoverflow.com”);   // similar behavior as clicking on a link window.location.href = “http://stackoverflow.com”;

4 thoughts on “How can I make a redirect page using jQuery?

  1. Hello There. I found your weblog using msn. That
    is a very well written article. I’ll make sure to bookmark it and come back to learn more of your useful information. Thank you for the post.
    I will certainly comeback.

  2. you are in point of fact a good webmaster. The web site loading pace is incredible.
    It sort of feels that you are doing any unique trick. In addition, The
    contents are masterpiece. you’ve done a fantastic task in this subject!

Leave a Reply

Your email address will not be published.Required fields are marked *