asp管理员安全退出~~要怎么写

来源:百度知道 编辑:UC知道 时间:2024/09/23 23:52:47
我做了一个程序 最后要让管理员安全退出 不知道代码怎么写
我原先把session("username")=admin的 最后的退出代码 我写的是
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="Image/style.css" type=text/css rel=stylesheet>
<script language="JavaScript" src="js.js"></SCRIPT>
</head>
<body text="#000000">
<%
Session("username")=""
Session("pwd")=""
%>
<div align="center">安全退出。
<Script Language="JavaScript">
setTimeout("location.replace('login.asp')",1200)
</Script>
</div>
</body>
</html>

但是退出以后 再按后退按钮 还是可以进到限制的页面里
求哪为有更好的解决办法。或把代码发出来下

<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
Session.Contents.Remove("username")
Session.Contents.Remove("MM_UserAuthorization")
MM_logoutRedirectPage = "login.asp"'退出后的页面
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow") Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & &