CodeIgniter Forums
session destroyed on logout, but back function working? - 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 destroyed on logout, but back function working? (/showthread.php?tid=53345)



session destroyed on logout, but back function working? - El Forum - 07-20-2012

[eluser]Unknown[/eluser]
I have passed val='logout' when the user presses logout, and in logout controller function isset($_REQUEST['val']) is checked. if val is set then i destroyed the session and redirected to index page. This is working perfectly,
but if i press back button of web browser the user home page is displayed (which will be displayed only when session data is set).


session destroyed on logout, but back function working? - El Forum - 07-20-2012

[eluser]Aken[/eluser]
It's because of the browser caching the page. Google this problem, you'll find tons of discussion.


session destroyed on logout, but back function working? - El Forum - 07-21-2012

[eluser]InsiteFX[/eluser]
Search for the jQuery history.js plugin