window.open target _self v window.location.href?

Definitely the second method is preferred because you don’t have the overhead of another function invocation:

window.location.href = "https://stackoverflow.com/questions/4813879/webpage.htm";

Leave a Comment