背景:從當前網站跳轉到新的頁面的時候,頁面會出現1到2S的白屏階段:
解決方法:
初始化寫法 :
window.location.href='xxxx.html'
寫法優化白屏時間:
window.history.pushState({}, '','xxxx,html');
參考鏈接