Cookies
Let's discuss another key concept of computer networking, cookies!
We'll cover the following...
Introduction
You might have heard of the term ‘cookie’ used a lot in the context of computer networks and privacy. Let’s have a closer look at what they are.
HTTP is a stateless protocol, but we often see websites where session state is needed. For instance, imagine you are browsing for products on an e-commerce website. How does the server know if you are logged in or not, or if the protocol is stateless? How does the server know what’s in your shopping cart when checking out if the protocol is stateless? Cookies allow the server to keep track of this sort of information.
How Cookies Work
- Cookies are unique string identifiers that can be stored on the client’s browser.
-
These identifiers are set by the server through HTTP headers when the client first navigates to the website.
-
After the cookie is set, it’s sent along with subsequent ...