在頁面中逐級進行點擊請求以下頁面:a.html->b.html->c.html
window.location.href 做跳轉 window.history.go(-1);window.history.back(); 方法時,會向服務器進行請求,根據服務器記錄的請求進行跳轉,因此會正確返回對應的頁面a.html。
window.location.replace 做跳轉 window.history.go(-1);window.history.back(); 方法時,不會向服務器進行請求,因此只會跳轉至a.html,未能返回到上級b.html。
