Using header(0 to manage user inactivity

From: Date: Sun, 03 Apr 2005 17:00:28 +0000
Subject: Using header(0 to manage user inactivity
Groups: php.general 
Request: Send a blank email to php-general+get-212117@lists.php.net to get a copy of this message
I'd like to be able to "timeout" a user if they are inactive for X minutes. Say, if they walk away from the browser leaving sensivive data in plain view. Is there any reason that using the header() function as below wouldn't be a reliable way to do this (albeit user-unfriendly)? It "works for me" on my Mac with various browsers, but I wonder how universally it will work. $timeout = 900; // 15 minutes header('Refresh: ' . $timeout . ';url=www.whatever.com/logout.php');

« previous php.general (#212117) next »