client.expiration()

NES2+Syntax

client.expiration(seconds)

Description

The expiration() method of the client objects sets the number of seconds of user inactivity before the JavaScript runtime destroys all properties associated with that session. The default timeout is ten minutes if you do not explicitly set this property. Also, this method has no effect when using URL encoding to maintain your client objects.

Note

Setting this to 0 will remove any cookies associated with the client object when using client cookies to maintain sessions.

Example

Listing 8.10 sets the destruction of the client object to occur after five minutes of inactivity.

Listing 8.10 Using the expiration() Method of the client Property
 <SERVER> // Set the expiration ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.