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:
<%Response.Cookies("chocolate") = "an ASP morsel"Response.Cookies("chocolate").expires = #2/29/2000#%>
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























