在windows .location.reload(true)之后,URL重定向在IE11中没有发生

URL Redirection is not happening in IE11 after window.location.reload(true)

本文关键字:IE11 重定向 URL location windows reload true 之后      更新时间:2023-09-26

当会话过期时,我正在对服务器进行window.location.reload(true)调用。单击按钮后,将调用服务器以获取详细信息,但浏览器上没有更改URL,因此即使在用户成功登录后也会显示相同的页面(超时页面)。这只发生在IE 11,因为它在Chrome等正常工作。

 <a href="/" onclick="window.location.reload(true)">Restart Session</a>

这是工作在chrome浏览器,但不是在IE(10及以上)

test well:

alert("page refresh")
function refresh() {
    setTimeout(function () {
        location.reload()
    }, 100);
}
<input type="submit" value="refresh" data-wrapper-class="custom-btn" data-corners="false" id="submit" onclick="refresh()">