This method allows the number of seconds before a session times out to be defined. After this time, the client object will be purged automatically and if the user connects again after that, a new client object will need to be created.
The expiration time can be set for individual client objects. You may have one that needs to persist longer based on the kind of session the user is experiencing.
For example, it might be useful to expire an e-commerce session quickly to prevent misuse. A content administrator may need a session to be active for a much longer time than usual.
Typical expiry time for this sort of thing would be about 30 minutes. This is in line with current practice of log analysis techniques and log auditing. Breaks of more than 30 minutes are considered to be multiple sessions.
Prev | Home | Next |
client.destroy() | Up | Client pull techniques |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |