Computer Cookie - Working, Vulnerability and Security

Computer cookies are small piece of information in text format that’s sent to an web browser by an web server. This information can be accessed either by the web server or by the client computer. Cookie information can be used for authentication, identification of a user session, user's preferences, shopping cart contents, or anything else that can be accomplished through storing text data.

What are the types of Cookie?

Role of Cookie in Internet
Session Management
Session management is the process of keeping track of a user's activity across sessions of interaction with the computer system.
Cookies may be used to remember the information about the user who has visited a website in order to show relevant content in the future. For example a web server may send a cookie containing the username last used to log in to a web site so that it may be filled in for future visits.
Tracking cookies may be used to track internet users' web browsing habits. This can also be done in part by using the IP address of the computer requesting the page or the referrer field of the HTTP request header, but cookies allow for greater precision.

How to View Cookies in Web Browser?
Microsoft Internet Explorer
Mozilla Firefox
Google Chrome
Apple Safari

Vulnerability on Cookies
Cookies are tracking devices for websites They keep track of commonly used information to help your browser operate more efficiently. They usually won't store passwords but often times track browser history, usernames, and other possible identifiers that can be used to gain access to accounts or exploit security vulnerabilities in your computer. Often they are simply text or web URL files so they won’t contain programs (i.e. viruses). The problem that cookies pose is that they have the ability to “share” this information over the internet.

How to Prevent Cookie from hackers?