please take a logout page and paste the following code in load event.
protected void Page_Load(object sender, EventArgs e)
{
try
{
FormsAuthentication.SignOut();
Session.RemoveAll();
Session.Abandon();
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-15);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
Response.Cache.SetNoStore();
System.Web.HttpCookie cook = Request.Cookies.Get(Common.CommonCookie.cookName.userCook.ToString());
cook.Expires.AddMilliseconds(1);
string[] cookies = Request.Cookies.AllKeys;
foreach (string cookie in cookies)
{
Response.Cookies[cookie].Expires = DateTime.Now.AddDays(-1);
}
}
catch {
FormsAuthentication.RedirectToLoginPage();
}
finally
{
FormsAuthentication.RedirectToLoginPage();
}
}
and
write the following jscript in loagin page
<script language="javascript" type="text/javascript">
window.history.forward(1);
</script>
<script language="javascript" type="text/javascript">
function disableBackButton() {
window.history.forward();
}
setTimeout("disableBackButton()", 0);
</script>