What are browser Cookies?

What Are Cookies Used For?

  1. Session management. For example, cookies let websites recognize users and recall their individual login information and preferences, such as sports news versus politics.
  2. Personalization. Customized advertising is the main way cookies are used to personalize your sessions. You may view certain items or parts of a site, and cookies use this data to help build targeted ads that you might enjoy.
  3. Tracking. Shopping sites use cookies to track items users previously viewed, allowing the sites to suggest other goods they might like and keep items in shopping carts while they continue shopping.

Setting a cookie

Cookies are set using the Set-Cookie header field, sent in an HTTP response from the web server. This header field instructs the web browser to store the cookie and send it back in future requests to the server (the browser will ignore this header field if it does not support cookies or has disabled cookies).

GET /index.html HTTP/1.1
Host: www.example.org
HTTP/1.0 200 OK
Content-type: text/html
Set-Cookie: theme=light
Set-Cookie: sessionToken=abc123; Expires=Wed, 09 Jun 2021 10:18:14 GMT

Information Security and Computer Privacy

Because a cookie can only be read by the company that places it, information security only becomes an issue if someone else gains access to the computer, or the website itself is hacked. Computer browser cookies cannot get any information stored on the computer that was not provided by the user to the website that placed the cookie.

Controlling Computer Browser Cookies

The computer user has control over the browser cookies placed on the system. Options include deleting browser cookies from the computer, adjusting the browser settings to delete cookies when exiting the browser, prompting before allowing cookies and blocking all third-party cookies.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store