Expiring Sessions

Server-side state storage is, in general, a better approach than storing state information on the client. However, client-side techniques do have one particular advantage over server-side state management:When your scripts don’t store any state on the server, they don’t have to be concerned about removing it or expiring it. That becomes the client’s problem. Clients handle this in various ways. Passive expiration occurs for state information stored on the client side in URLs or in hidden fields automatically when the user closes the window or goes to a different page. Client-side information stored in a cookie can be more persistent because cookies can be given an expiration date— but even so, expiring the cookie is something ...

Get MySQL and Perl for the Web 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.