Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 29-Apr-19 18:10pm

 
Share this answer
 
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");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900