Thursday, 6 February 2014

Cookie Types

1. In-memory cookies: An in-memory cookie goes away when the user shuts the browser down.
If you create a cookie without specifying an expiration date, you are creating an in-memory cookie, which lives for that browser session only. The following illustrates the script that would be used for an in-memory cookie: 
Response.Cookies("SiteArea") = "TechNet" 

2. Persistent cookies: A persistent cookie resides on the hard drive of the user and is retrieved when the user comes back to the Web page. 
The following illustrates the script used to create a persistent cookie: 
Response.Cookies("SiteArea") = "TechNet" 
Response.Cookies("SiteArea").Expires = "August 15, 2000" 

No comments:

Post a Comment