Cookies: The Advantages And Limitations Of Cookie Scenarios

934 Words2 Pages

A tiny bit of text assist requests and pages as they go between the Web server and browser is called a cookie. The information that can be read by the web application will be checked by the cookie whenever the site is being visited by the user. Scenarios Cookies provide a means for Web applications to store user-specific information. It is stored with the help of cookies. For example, when a user visits a site, to store user preferences or other information, that site can use cookies. When the same Web site is being visited by the same user another time, the information that has been stored earlier can be retrieved by the application Background Whenever the user visits the site, the cookie will contain the information that can be read by the Web application. For example, when the user requests a page from a site …show more content…

Cookies are used for many purposes. For example, a site conducting a poll might use a cookie simply as a Boolean value to indicate whether the user's browser has already participated in the voting so that the user cannot vote twice. A site that asks a user to log on might use a cookie to record that the user already logged on so that the user does not have to keep entering credentials. Cookie Limitations Most browsers support cookies up to 4096 bytes. Due to this small limit, cookies are being used to store a small amount of data. Writing Cookies It is the responsibility of a browser to manage cookies on the user’s system. Cookies are sent to the browser via the httpresponse object that exposes a collection called Cookies. HttpResponse object can be accessed as the Response property of Page class. Any cookies that the user wants to send to the browser must be added to this collection. When creating a cookie, a Name and Value must be specified. Each cookie must have a unique

More about Cookies: The Advantages And Limitations Of Cookie Scenarios

Open Document