I would like to know the best way to implement logout.In my logout.aspx i clear all the session variables.but when i click my browser back button i can view the pages.when i try to click anyhting with in those it takes to default.but my question is why does back button takes me to the last viewed page.
Is there a way to handle it.???
yh_ink:I would like to know the best way to implement logout.In my logout.aspx i clear all the session variables.but when i click my browser back button i can view the pages.when i try to click anyhting with in those it takes to default.but my question is why does back button takes me to the last viewed page.
Is there a way to handle it.???
are you doing a clear or a Session.Abandon() ??
also your logout page should (IMHO) re-dir the user to the /default.aspx or /default.html page
I am not 100% sure but I think if you do an abandon and toss them to a defualt page that you will be in good shape. make sure that the app requires a login and the default does not.
session.clear just kills the session vars. Abandon invalidates the session.
and as you note even if they go back they get prompted for a logon.
remember: the client can request a page, we can not force to much.... just make sure the server does the "right thing" with the request.
I've seen devs spend way to much time trying to hack that back button in apps!
figuerres:are you doing a clear or a Session.Abandon() ??
ok i agree with you.But how does the big sites like yahoo,hotmail etc handle this.I noticed that after logout.no matter how much i try to click back it directs to the login page in these sites.Just curious to know what they do???
How do they handle this???Any ideas please let me know
when a browser back button is clicked it does not come to the server instead gets the page from its own cache.once it comes to the server it will work fine.what i want to know is how to handle back button.
For example now login in to this csla forums and hit logout.then click browser back button.the page viewed will be displayed.click anything with in that it will take to login page.
do the same login in to some site like yahoo.u can find the difference
Copyright (c) Marimer LLC