posted 10 years ago
Hello everyone,
My problem is when i m clicking logout button it will successfully goes on login page but when i click on back button it loads previous page which i don't want..please help me it's urgent..My lagout page is as follows..And i have tried all solutions available on net..
logout.jsp
<%--
Document : logout
Created on : 1 Nov, 2013, 6:43:53 PM
Author : ASUS
--%>
<%@page contentType="text/html" pageEncoding="UTF-8" session="false" autoFlush="true" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<title>Logout</title>
<script language="javascript">
window.history.forward(1);
browser.cache.offline.enable = false;
function noBack() { window.history.forward(1);
}
//***Get what is above onto one line***
self.close()
//function disableBackButton()
//{
//window.history.forward(1);
//}
//setTimeout("disableBackButton()", 0);
</script>
</head>
<body onload="noBack()" >
<h1>
<%
request.getSession().invalidate();
//response.setHeader("Cache-Control","no-store"); //HTTP 1.1
//response.setHeader("Cache-Control","no-cache");
//response.setHeader("Pragma","no-cache"); //HTTP 1.0
//response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
response.sendRedirect("login.jsp");
%>
</h1>
</body>
</html>