CodeIgniter Forums

Full Version: session is maintained when browser back button is clicked
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]PHPraja[/eluser]
hi all...
my problem is though i logged out from my application ie(current userid in session is destroyed) and when i click browser back button the userid in session is still maintained. with out disabling the browser's back button, is there another solution for my problem?
I want the session to be destroyed and the previous page should not be displayed.
hope my problem is clear.. me requesting for any code....

thanks in advance..

El Forum

[eluser]Pascal Kriete[/eluser]
CI sessions are stored in cookies so you need to redirect after logging them out.

El Forum

[eluser]mironcho[/eluser]
Probably the page is cached. What's happening if you reload this page after going back?

El Forum

[eluser]PHPraja[/eluser]
hi .. thanks for the reply...

sorry..... i did n't get you clearly. Can you be more clear with your answer.

El Forum

[eluser]Pascal Kriete[/eluser]
Code:
$this->session->unset_userdata('userid');
redirect('controller/function');