Thursday, 5 July 2012

Types and Uses of Cookie

Types of Cookies:
Cookies can be temporarily and persistent.

• Temporary cookie: Temporary cookie is also called session cookie. It is stored temporarily in browser’s memory and is deleted when the session ends or the browser is closed.

• Permanent cookie: Permanent cookie is also called persistent cookie. It is stored permanently on computer’s hard drive. If it is deleted, it will be recreated when the user visits the website again.

Uses of Cookies:

Cookies are used for different purposes such as follows:
• Most websites use them for personalization of user preferences. For example,  a news website may allow the user to customize the page to display the news of his interests, The website stores user preference in cookies.
Some websites also use cookies to store user’s passwords. The users do not need to enter the password again and again.
• Some website use cookies to track visits of users and web pages visited by the users.
• Online shopping sites generally use session cookies to keep the track of items in a
user’s shopping cart.
• Some website may use cookies to target advertisement. These sites store a user’s
interests and browsing habits in the cookie and display related ads on the pages.