Member-only story

Cookies and Session

Shiori Soma
3 min readJul 29, 2021

--

Photo by Food Photographer | Jennifer Pallian on Unsplash

My perception:
A memory function on the web browser side that remembers what you have done when you access a web server.

What is a Cookie?

A cookie is an extension of the HTTP specification that allows information to be exchanged between a web application and a web browser.
Information (cookies) made up of a combination of “name = value” is sent from the webserver to the web browser using the HTTP response header.

A cookie is a piece of information stored in a web browser (client).

When a web browser receives a cookie from a web server, the next time it accesses the same web server, it sends the received cookie as is in the HTTP request header.

The state of the client-side (Web browser) is maintained based on the cookie information.

Problems with Cookies

Cookies are not secure because they can be easily peeked at by using certain tools!
Therefore, as a way to keep more information more safely, a mechanism called “Session” was devised

How does a session work?

  1. A user uses a web browser to access a web server.
  2. The web server issues a session ID and associates it with…

--

--

Shiori Soma
Shiori Soma

Written by Shiori Soma

I’m a front-end web developer based in Vancouver, studying CICCC, an web and mobile app development course. https://shiory602.github.io/portfolio/

No responses yet