I&#39;m using twisted web (not nevow) in an application right now.  I&#39;m handling expiration by having a LogonState  Session variable, which has an is_logged_in member that defaults to False.  All requests are checked for this and redirected to my logon page if is_logged_in is not true.<br /><br />This is all working fine, but unfortunately, it means that timeouts are abrupt - you are just re-directed to a logon page with no warning the next time you try to access a resource after session timeout.<br /><br />Session expiration callbacks don&#39;t seem that useful here.  I&#39;ll be notified, but then the session is gone and I no longer have any way of knowing if the next request is from someone who once had a valid session, but no longer does.<br /><br />How do others deal with this issue?