Internet News Internet Investing Internet Technology Windows Internet Tech. Yesterday's lesson discussed how cookies could be used to maintain simple state information over long periods of times. Cookies are small text files written to the client's computer. As you learned yesterday, cookies can be written to the client's computer using the Response. Cookies collection and can be read using the Request.
Cookies can persist on the client's computer for a variable amount of time.
When writing a cookie to the client's computer, you can set when the cookie expires. This can be in a day, a week, or even a year. Cookies allow a user's state to be maintained beyond the current visit. Let's examine how you can use cookies to maintain this information. Listing 11.1 created a simple form in which the user was prompted to enter his or her name.