Return to Snippet

Revision: 46531
at May 20, 2011 23:31 by vagrantradio


Initial Code
// simulates similar behavior as an HTTP redirect
window.location.replace("http://snipplr.com");

// simulates similar behavior as clicking on a link
window.location.href = "http://snipplr.com";

Initial URL

                                

Initial Description
If you want to simulate someone clicking on a link, use location.href. If you want to simulate an HTTP redirect, use location.replace.

Initial Title
jQuery Redirect

Initial Tags
redirect

Initial Language
jQuery