Safari Back button not honouring PHP logout session

Posted by Steve Kemp on Stack Overflow See other posts from Stack Overflow or by Steve Kemp
Published on 2010-06-09T13:54:10Z Indexed on 2010/06/09 14:42 UTC
Read the original article Hit count: 424

Filed under:
|
|
|
|

I've got a logout.php page which ends a user's session and works well and does the following:

session_start(); session_unset(); session_destroy();

I've just noticed when testing with Safari that when you logout you can click the back button to return to the previous page which requires authentication but are not prompted. You cannot navigate away from this page without entering the navigation but it should not be displaying the previous page in the first place.

So far in my testing this is only an issue with Safari on Mac OS X and there are a number of other reports about this but with no resolution that I could find:

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_23702691.html

I would love to be able to disable this behaviour with Safari's back button - surprised that this is happening in the first place.

Thanks, Steve

© Stack Overflow or respective owner

Related posts about php

Related posts about session