asp.net中的注销问题 [英] logout issue in asp.net

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

问题描述

嗨朋友们,



我在退出时遇到问题。

当我与其他用户登录时,浏览器显示上一个来自互联网临时文件的用户页面。我无法处理这个问题。请帮帮我。

Hi friends,

I am getting issue on logout.
when i am login with other user the browser is displaying the previous user page from the internet temp file.And i am unable to handle this. please help me.

推荐答案

尝试这个提示/技巧



注销后浏览器后退按钮问题 [ ^ ]
Try this Tip/Trick

Browser back button issue after logout[^]


此问题一次性发生用户注销后,页面仍然可以从缓存中获取。因此,一旦用户注销,就需要清除缓存。请在注销功能中包含以下代码行以清除缓存。



This issue happens as once the user logs out, the page can still gets served from the cache. Hence the cache needs to be cleared once the user logs out.please include below lines of code in your logout function to clear cache.

HttpContext.Current.Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate");

HttpContext.Current.Response.AddHeader("Pragma", "no-cache");

HttpContext.Current.Response.AddHeader("Expires", "0");


这篇关于asp.net中的注销问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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