CodeIgniter Forums
session is maintained when browser back button is clicked - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: session is maintained when browser back button is clicked (/showthread.php?tid=9509)



session is maintained when browser back button is clicked - El Forum - 06-27-2008

[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..


session is maintained when browser back button is clicked - El Forum - 06-27-2008

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


session is maintained when browser back button is clicked - El Forum - 06-27-2008

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


session is maintained when browser back button is clicked - El Forum - 06-27-2008

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

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


session is maintained when browser back button is clicked - El Forum - 06-27-2008

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