Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Cookie Seesions -again !

by sutch (Curate)
on Feb 07, 2001 at 18:30 UTC ( #56959=note: print w/replies, xml ) Need Help??

in reply to Cookie Seesions -again !

Don't set an expire time for the cookie. This will return a cookie that only persists for as long as the user's browser is open.

You may want to consider providing a method for users to logout, which would remove the cookie from the user's browser and delete the session file on the server. To handle stale session files on the server, store the date of last use in each file (alternatively name the session file with this date) and periodically have a program delete session files older than a certain, reasonable date.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://56959]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2016-10-23 21:30 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (302 votes). Check out past polls.