表格的注销代码 [英] logout code for forms

查看:83
本文介绍了表格的注销代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你可以在html中找到退出表格的代码,所以按下后退箭头没有人能看到我的账号。

Can u get me code for logout form in html so thst by pressing back arrow no one could see my account.

推荐答案

很多人问这个和答案总是一样的。如果您将人员记录下来,那么如果您允许浏览器缓存您的页面,则后退按钮将仅显示已登录的内容。 PHP没有任何关系。



http://www.htmlgoodies.com/beyond/reference/article.php/3472881/So-You-Dont-Want-To-Cache-Huh。 htm [ ^ ]
Lots of people ask this and the answer is always the same. If you log people out, then the back button will only show logged in content if you allow your pages to be cached by the browser. PHP has NOTHING to do with it.

http://www.htmlgoodies.com/beyond/reference/article.php/3472881/So-You-Dont-Want-To-Cache-Huh.htm[^]


public partial class logout : System.Web.UI.Page
    {
        protected System.Web.UI.WebControls.Literal Literal1;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                Literal1.Text = "<pre lang="c#">

;注销......;

Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Response.Cache.SetNoStore();

}

catch {}

}





protected void Timer1_Tick(object sender,EventArgs e)

{

试试

{

FormsAuthentication.Sig nOut();

Response.Redirect(helpdesk.aspx);

}

catch {}

}

}

;Logging out…";
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
}
catch { }
}


protected void Timer1_Tick(object sender, EventArgs e)
{
try
{
FormsAuthentication.SignOut();
Response.Redirect("helpdesk.aspx");
}
catch { }
}
}


protected void btnLogout_Click(object sender, EventArgs e)
       {

Session.Abandon();
Session.Clear();

Response.Redirect("main.aspx");
}


这篇关于表格的注销代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆