防止asp.net页面通过IE后退

由于项目的需要不允许系统在提交之后,按IE的后退按钮进行再次提交。
试试了一下在 .NET中通过如下语句
 Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
就可以使页面的缓存失效,每次都需要获取新页面。
顺便找了一下asp中的处理方法如下:
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
也测试通过。

不过通过添加Client-side的方法:
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
没有测试通过,请哪位指点一下

另外如果点击IE的后退按钮提示“页面已经失效” 这种效果如何实现也请指点一下

posted on 2004-09-23 15:49  吹雪  阅读(9034)  评论(15编辑  收藏  举报

导航