Home Segments Top Top Previous Next

1060: Mainline

You can create multiple cookies that have the same name, as long as you have not exhausted the memory limit placed on cookies. You can use identical names if, for example, you want to keep track of the movies that a given user has evaluated. For each, you might construct a cookie such as the following:

Cookie cookie= new Cookie("evaluated", "title of movie"); 

Note, however, that browsers are not obligated to maintain an indefinite number of cookies. You should not count on storing more than 10 cookies, to be on the safe side.