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.
即使我使用 session.invalidate 方法,我的网页也会被缓存。如何使用 java 编码删除页面缓存?
您需要在页面中设置适当的标题,以便它们不会被浏览器缓存:
response.setHeader("Cache-Control","no-cache"); response.setHeader("Pragma","no-cache"); response.setDateHeader ("Expires", -1);
和
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">