[prog] cookies

Diggy Bell diggy at dbsoftdev.com
Fri May 14 13:40:30 EST 2004


Hi Becky,

I've run into a situation like this related to loading of user access keys.
I only want to load the data when the user logs in, and then maintain that
data until they log off or close their brower.

You didn't mention how you are developing your application so this may be
totally useless, but having said that...

I do most of my web development using PHP.  PHP has a nice session feature
that works well for situations like this.  There is a 'session' cookie
automatically set by PHP.  That cookie is used to load session data on the
server when the user makes a request.  I keep the read-once data as part of
my session data so it's always available.  When the user logs off, I discard
the data from the session.  When they close their browser, the cookie is
discarded and the PHP session mechanism cleans up expired sessions.

If you're not using PHP, a quick Google looks like Perl has something
similar, and there is probably something available in C/C++.

Diggy

----- Original Message ----- 
From: "Becky L. Norum" <bnorum at coe.neu.edu>
To: <programming at linuxchix.org>
Sent: Thursday, May 13, 2004 1:17 PM
Subject: [prog] cookies


> Is there any way of removing a cookie from a browser before the browser is
> closed?  I know that if you set the expiration date to an earlier date it
> will delete the cookie when the browser is closed.
>
> Thanks,
>
> Becky
> _______________________________________________
> Programming mailing list
> Programming at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/programming
>
>




More information about the Programming mailing list