我在jsp页面中添加了以下元标记
- <html>
- <head>
- <title>xyz</title>
- <link type='text/css' rel="stylesheet" href="sdsds/sdsd"/>
- <Meta content="max-age=0" http-equiv="cache-control">
- <Meta content="no-store" http-equiv="cache-control">
- <Meta content="-1" http-equiv="expires">
- <Meta content="Tue,01 Jan 1980 1:00:00 GMT" http-equiv="expires">
- <Meta content="no-cache" http-equiv="pragma">
- </head>
- <body><h1>jsdsdsds</h1>
- <a href="abc">click me</a>
- </body>
- </html>
通过单击链接“单击我”导航后,我将打开一个新页面.当我点击后退按钮它正在工作..我希望页面过期..
注意:在两个jsp页面中我添加了相同的元标记.
我尝试添加这个
- <%@ page import="java.lang.*" %>
- <%
- // Set to expire far in the past.
- response.setHeader("Expires","Sat,6 May 1971 12:00:00 GMT");
- // Set standard HTTP/1.1 no-cache headers.
- response.setHeader("Cache-Control","no-store,no-cache,must-revalidate");
- // Set IE extended HTTP/1.1 no-cache headers (use addHeader).
- response.addHeader("Cache-Control","post-check=0,pre-check=0");
- // Set standard HTTP/1.0 no-cache header.
- response.setHeader("Pragma","no-cache");
- response.setDateHeader ("Expires",0); //prevents caching at the proxy server
- %>
以上HTML和内部Head ..还有我可以看到后页.,
在mozilla firefox 10.0和IE8中测试过
有什么建议吗?