devxlogo

Make Your Cookies Live Longer

Make Your Cookies Live Longer

When using ASP to create browser cookies, by default the cookie is alive only as long as the browser is running. You can make cookies last longer by defining an expiration date at the same time you bake the cookie. Note that since the user might be anywhere on the globe, the convention is to use UNC time. The following code sets a cookie that expires on leap day, in the year 2000:

 

devx-admin

Share the Post: