Hi!
How I do it:
I wrote a small function in PHP, that checks for the session (cookie). If it doesn't find a cookie (means, the session expired), I execute some code in PHP using header() to reroute them. Means I log them out visible.
The following page reads a statement that they have been logged out due to the session being expired or whatever, and the page has a new login prompt.
PHP Code:
if ( session_is_registered ("some_var_I_saved_in_the_session") == FALSE) {
session_destroy(); // not needed, just to make sure
header ("Location:index.php?logged_out=1");
}
The reason why I would recommend using something like PHP, is that it's on the server side. It will "always" work.
_till