set cookies to expire

P

paul

I agree that if you don't want a cookie to last longer than a session,
then use session variables. But anyways here is an answer to your
question about having a cookie quickly expire.

Cookie Monster: Using Cookies in ASP
By Ian Stallings
http://www.4guysfromrolla.com/webtech/051099-1.shtml
<<
The next important property is the Expires property. This specifies the
date the cookie should expire. If it is set to a past date then it will
expire when the browser is closed.

When setting the date it can be set a couple of ways. You can use the
current date and add or subtract days like so:

Response.Cookies("name").Expires = Date + 365
Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top