
<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中测试过
有什么建议吗?
突出的一个是在JavaScript中使用这个代码:`
window.history.forward();
`
但它会将您的后退请求转发到历史记录中的当前页面
对我有用的是:
<script type="text/JavaScript">function noBack(){ location.replace(logouturl); window.location="logouturl";} HTML
<input type="button" value="SignOut" onclick="noBack()" align="mIDdle">总结
以上是内存溢出为你收集整理的html – 如何在后退按钮点击过期页面?全部内容,希望文章能够帮你解决html – 如何在后退按钮点击过期页面?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)