pushHistory(); window.addEventListener("popstate", function (e) { location.href = '@Url.Action("Index", "Account")' + "?openid=" + openid; }, false); function pushHistory() { var state = { title: "title", url: "#" }; window.history.pushState(state, "title", "#"); }