Welcome Guest, Not a member yet? Register   Sign In
sess_destroy
#1

[eluser]Unknown[/eluser]
Hi, I'm fairly new to CodeIgniter(my first framework, actually) and PHP. My problem is how to prevent the user from viewing the previous page is he is logged out. I can see this problem with your forum software. I tried to log out and then hit the browser's back button, and I see the previous page. I use this code in my logout function
Code:
$this->session->sess_destroy(); redirect('ctrlr/login_func');
but it didn't work. Then I tried to remove the cookies, still didn't work (deleting the cookies then hitting refresh will redirect me to my login page).

I already googled this. Still no luck with their cache-control: no-cache or pragma: no-cache.
What im trying to prevent is what if you are using a public pc in a public place, and when you log out, another user will be using the pc and hit the back button. he can see your sensitive information. that's it.

im sorry for the title. couldnt think of a smarter one. giving a title is the hardest part ;-)


Messages In This Thread
sess_destroy - by El Forum - 03-06-2012, 07:19 PM
sess_destroy - by El Forum - 03-06-2012, 09:39 PM
sess_destroy - by El Forum - 03-07-2012, 12:52 AM
sess_destroy - by El Forum - 03-07-2012, 03:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB