I have a logout controller in codeigniter :
session->sess_de
My problem had to do with caching on the server side. The quickest I could fix it was by appending random text to the logout link:
load->helper('string');
echo anchor('/home/logout/'.random_string(), 'logout');
?>
home/logout contained the same code as function index
in the question.
Just so you know the redirect('/', 'refresh')
did not work for me, but I again I did a quick test.
I am guessing that the random_string()
method can be replaced by outputting headers that force cache to be cleared etc. As you have probably guessed, I can't do that right now as I am super busy. Maybe later.