Prev   Next

Back to the top of the FAQ

Q. With Cookie based protection, I am trying to get the cookies to be persistent, but they always seem to expire with the session. I don't want the user to log in each time they come to the site. How do I make the cookies persistent?
A.

To make the cookies persistent, set the date you want the cookie to expire in in the loginNow.asp (or equivalent) script, eg:
response.Cookies(cookieName).Expires = #July 4, 2010#
Response.Cookies("name").Expires = Date + 365
Response.Cookies("name").Expires = #January 01, 2011#
Response.Cookies("name").Expires = #01/01/2014#
Response.Cookies("name").Expires = #7/30/12 00:00:00#
should all be valid.

Back to the top of the FAQ

Prev   Next