fmwebschool.com
Top Experts [learn more]Top 4-10
webko

9743 K
bandmandq

2458 K
Genx

1525 K
4. tcmeyers
5. kbata
6. Martie
7. Hammerton
8. rrenfrow
9. bneeman
10. plegler
Welcome, Guest. Please login or register.
May 22, 2013, 07:52:20 PM

Login with username, password and session length
Search:     Advanced search
Welcome to the FileMaker Web Masters Exchange.  If you have any questions about how to use this forum, please watch the getting started movie at:
http://www.fmwebschool.com/movies/forum1/forum1.html
27462 Posts in 6065 Topics by 1523 Members
Latest Member: donok
* Home Help Search Calendar Login Register
+  fmwebschool.com
|-+  PHP Web Publishing Technologies
| |-+  FileMaker's New PHP API
| | |-+  Session Logout and Safari Back button issue
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Session Logout and Safari Back button issue  (Read 1741 times)
fmdataweb
Jr. Member
**
Offline Offline

Posts: 68



Applications:
« on: June 09, 2010, 07:28:41 AM »

I've created a site which requires authentication and has a login.php and a logout.php page. This is all working well, but I've just noticed that during testing on my Mac OS X 10.6.3 Mac and also on my iPhone that when I logout it ends the session successfully, however when I click the back button it takes me to the previous page showing the contents without requiring authentication. This doesn't happen on my PC with Windows XP SP3 and Internet Explorer 8. My logout.php page uses:

Code:
session_start(); session_unset(); session_destroy();

and I've tried adding headers to all the protected pages:

Code:
<?php 
header
("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past 
?>


but this makes no difference. Can anyone else confirm this happens for them. Doesn't appear to be an issue with the PHP API but something related to Safari/webkit browsers and the back button.
Logged
fmdataweb
Jr. Member
**
Offline Offline

Posts: 68



Applications:
« Reply #1 on: June 09, 2010, 07:29:46 AM »

Forgot to add that there are a number of similar reports that I Googled, including:

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

http://discussions.apple.com/thread.jspa?messageID=11579135

but no answer to the problem so far that I could find.
Logged
webko
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2050
Kudos: 9743



WWW
Applications:
« Reply #2 on: June 09, 2010, 04:47:11 PM »

I think it's actually showing you a cached version of the page from history, rather than a re-query - IE is very strong on killing cached pages, Safari less so...

Look into the meta commands for page expiry and see if you have any joy... set the results page to expire in the past.
Logged

tim.webko_at_gmail.com
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!