Slow logout on different server
Posted: Mon Aug 04, 2008 2:00 pm
So here is the situation. I am running a website on my local machine as well as a copy of the website on a server. Now on my local machine, logout is instantaneous pretty much. As for the server, it just depends on its mood I guess. Admins seem to log out instantly whereas users sometimes wait 30+ seconds. While waiting, I noticed if I hit f5, I'm still logged in, but if I click log out again after hitting f5, I log out nearly instantly. As for the server, nothing else on it lags, ever. Let me put in some of my code snippets and see if you see anything odd. Seems the code is simple and straight forward though. Not seeing the issue.
Link to logout page:
logout.php:
session function logout():
Any help is appreciated.
Link to logout page:
Code: Select all
<?php
if($_SESSION['logged_in'])
echo '<br><br>You are currently logged in [<a onClick="return confirmLogout()" href="logout.php">logout</a>]';
else
include("login.php");
?>
Code: Select all
<?php
include("extras/session.php");
$session->logout();
header("Location: index.php");
?>
Code: Select all
function logout(){
session_destroy();
}