I have been trying out the sessions in PHP. Am able to log into a my site and sessions for that particular logged on session. My problem is with the logout. Am unsetting and destorying the session on my way out but when I click on the back button on my browser, I am able to view my last visited page. how can i get around this?
logout using session
Collapse
X
-
Heya, pardhu. Welcome to TSDN!
You're likely seeing this behavior because your browser cached the page. When you click the back button, no request is actually getting sent to the server; the browser is serving up a copy from its cache of saved pages instead.
Try pressing the back button and then clicking on any of the links on that page. You should be redirected to your login page.
Check out this article for more info on browser caching and how to prevent it.Comment
-
Originally posted by ronnildoes your page have a protect function disabling to view it without the session variable set?
I haven't use any oops concept.I have given session_start() ; to every page,
and at the end in the logout page i started the session and also destroyed the
session.Comment
Comment