CodeIgniter Forums
back button - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: back button (/thread-36915.html)



back button - El Forum - 12-20-2010

[eluser]Unknown[/eluser]
Hi everyone
I'm new to codeigniter. If you can please help.
I did a small login page with post method.
The user enters his email and password and get inside an admin area.
The problem is when I logout and press the back button I can see the admin area again, probably loaded from the cache. How can I resolve this please.


back button - El Forum - 12-20-2010

[eluser]mi6crazyheart[/eluser]
Put this piece of code in the "headTag" of u'r VIEW page which u want to block by back button after getting logout...
Code:
<?php
    header("Cache-Control: no-cache, no-store, must-revalidate");
    header("Pragma: no-cache");
?>



back button - El Forum - 12-20-2010

[eluser]Unknown[/eluser]
:-) Wow man. It work!!! In the last 2 days I tried to resolve this!
Thanks a lot.
BTW, Why I cant see those header parameters when I click the view source of the browser?
Again, Thank you so much.
Yalon


back button - El Forum - 12-20-2010

[eluser]mi6crazyheart[/eluser]
About...
[quote author="yalon" date="1292857608"]Why I cant see those header parameters when I click the view source of the browser[/quote]
can't say a lot. If u want to know more digg at here : http://php.net/manual/en/function.header.php