response.Cookies( SOFTWARE_PROGRAM_NAME).Expires = datetime.now.adddays(365*10)
this sets expiration for 10 years.
Anyway to set it for unlimited?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Cookies were intended to store temporary state information, like a token that identifies a shopping cart or user authentication session. User’s can of course easily delete your cookie by clearing their browser cache anyway. If you want a cookie that lasts forever, you are never going to get it, and its not what cookies are for. If you want to store user-based information permanently, consider storing it in your database or other server side storage.
From RFC2109:
There are, of course, many different potential contexts and thus many different potential types of session. The designers’ paradigm for sessions created by the exchange of cookies has these key attributes:
Each session has a beginning and an end.
Each session is relatively short-lived.
Either the user agent or the origin server may terminate a session.
The session is implicit in the exchange of state information.
I.e. cookies must expire because each session has a beginning and an end.