JavaScript - Redirect

Aus Laub-Home Wiki
// simulates similar behavior as an HTTP redirect
window.location.replace("http://foobar");

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

// in jQuery
$(location).attr('href', 'http://foobar');