我在 ajax 调用后(更新内容后)使用 JavaScript 重定向。我试过下面的方法,都很慢。在网络选项卡中,它显示等待时间约为4.44到5秒。(这对客户来说非常令人沮丧:()
window.location.assign(to_redirect);
window.location.replace(to_redirect);
location.href= to_redirect;
window.location.href= to_redirect;
window.location = to_redirect;
在逐页浏览网站时(通过鼠标点击),它的等待时间是350ms到450ms。
为什么呢 ?有什么我错过的或任何其他更快的方式吗?
更新:
根据评论者的要求,下面是截图。