与登录相关 [英] Related with login

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

问题描述



我想要以下问题的解决方案,
用户登录网站然后注销,他的账户必须关闭
但是,当我按下浏览器的后退按钮时,现有用户的a/c将打开. br/>

HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate");
            HttpContext.Current.Response.AddHeader("Pragma", "no-cache");
            HttpContext.Current.Response.AddHeader("Expires", "Fri, 01 Jan 1990 00:00:00 GMT");



它的作用是,它要求浏览器不要缓存页面.因此,当用户点击后退"按钮时,浏览器将始终从服务器获取新页面.


Hye,

i want''s the solution of below problem ,
user login into site then while he is logoff ,his a/c must be close
but while i press the back button of exploror the a/c of existing user will open.

解决方案

Add these following 3 lines in Page_Load event of all the pages.


HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate");
            HttpContext.Current.Response.AddHeader("Pragma", "no-cache");
            HttpContext.Current.Response.AddHeader("Expires", "Fri, 01 Jan 1990 00:00:00 GMT");



What it does is, it asks the browser to not to cache the page. so when user hits the back button, browser will always get the new page from the server.


这篇关于与登录相关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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