rugby Posted July 5, 2006 Share Posted July 5, 2006 Hi ???I make a site using login, but after logout i still can open my previous page using back button. I have to refresh the page to redirect the page to login form. I have abandon all session but it doesn't work ? anyone know why this is occur Link to comment Share on other sites More sharing options...
pulpfiction Posted July 5, 2006 Share Posted July 5, 2006 This is just because the page is not reloaded, instead the content of the page is displayed from cache, but when you try to do some action in the page [like a button click] which will reload the page, then it will redirect to the login page. [ I guess you are checking the login session variables at the beginning of every page] Link to comment Share on other sites More sharing options...
justsomeguy Posted July 5, 2006 Share Posted July 5, 2006 They only thing you can try is to have your page turn off caching, so that they are never cached. Then pressing Back would force the browser to go back to the server, which would execute your code. Link to comment Share on other sites More sharing options...
rugby Posted July 6, 2006 Author Share Posted July 6, 2006 would you mind to give me the solution ? (you're right i check the login session variables at the beginning of every page) so when i pressed the back button the page is reloaded and will redirect to the login page Link to comment Share on other sites More sharing options...
pulpfiction Posted July 6, 2006 Share Posted July 6, 2006 Try turning off caching using <META>...<META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1"><META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now