在更新内容后,我正在使用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。
为什么会这样?我有没有漏掉什么或者有没有更快的方法?
更新:
按照评论者的要求,以下是屏幕截图。