为什么谷歌浏览器不缓存搜索记录?

问题描述 投票:0回答:1

我在Chrome中遇到了奇怪的行为,我不知道如何解决。当我在页面之间浏览时,我已通知Google chrome不缓存我的搜索历史记录。看下图:enter image description here

值得一提的是,页面之间的夹缝由以下功能的javascript执行:

window.location.replace({URL});
javascript browser-history
1个回答
0
投票

MDN docs for location.replace()

location.replace()方法用提供的URL中的资源替换当前资源。与Location.replace()方法的区别在于,使用assign()后,当前页面将不会保存在会话assign()中,这意味着用户将无法使用后退按钮导航到该页面。

replace()replace()可能更适合您的情况。

© www.soinside.com 2019 - 2024. All rights reserved.