I need to redirect the user using JavaScript. Which is the preferred method?
window.open("webpage.htm", "_self");
or
window.location.href = "webpage.htm";
Definitely the second method is preferred because you don't have the overhead of another function invocation:
1.4m articles
1.4m replys
5 comments
57.0k users