Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当用户通过按后退按钮从第 2 页返回到第 1 页时,如何强制刷新第 1 页?是否有 vbscript 或 javascript 方法,或者是否以某种方式设置“无缓存”?
在第 2 页设置 cookie。
如果在第 1 页检测到 cookie,请重新加载该页面。
做这样的事情怎么办?
<script> if (document.referrer == "http://www.page2.html") window.location.reload(); } </script>
只需将其放在第 1 页的顶部即可。
更新
我还在Webdeveloper.com 论坛上找到了解决方案。