In this video, we'll be discussing about cookies and sessions.
So cookies and sessions is the most, you know, the important thing and also the famous technology
that will be using by many big companies like Amazon, Flipkart, etc..
So what do you mean by cookies and sessions?
So for that, let's say we're having a browser and a server.
So let me open up and to.
Yeah.
And the next clearly.
So.
Just a second.
So here you have a browser.
And a sort.
Right.
So when you're sending that request to the server.
Ben, my handwriting.
So when you get to get requests for the server, you'll get a response, right?
Similarly, when you send a post request for the satellite.
Not going to get a response.
So, for example, consider a case like Amazon in Amazon, you will add some products to your cart,
right?
Relax and product to your cart.
So after a few days whenever, if you did not complete the payment, then after a few days when you
come back and again log in, then the data will be still present in the carts.
So this is what cookies does.
So they're not making a post request.
Of adding a product to the cart.
That means this post request will be adding, you know, adding the.
Product that I've got so that Bush, Jeb Bush will be adding, so let me tape it, but a post request
will be adding the product.
The court.
So when we added this product to the cart at this time, at this moment in time, the Amazon service
will create a cookie that contains that data and it would end when it responds to the post request that
Cookie gets along, gets sent along and grows and gets to preserve that cookie.
So basically, what's happening is we are sending this post request then as a response, as a response.
The Amazon Sidewalk.
Will send a cookie.
Containing.
Containing the information on the products of the data.
OK.
And it tell the browser to safe.
It will tell the browser itself that cookie.
To same that cookie.
Right.
So that when we come after a long time, that Cookie still saved on that browser, on your browser.
So the next time when we make a great request to the Amazon servers, that Cookie gets along, gets
that cookie gets sent along with that, get requested Amazon server to allow the server to be able to
identify who you are and see if you had any previous sessions on Amazon or not.
So basically, again, after a few days, you are sending a request, then you are sending this cookie
also to that Amazon server through your get request.
And then they will see what is the data that you're having and then they'll send the data back to you.
So there are lots of different types of cookies, but the types of cookies we are going to be looking
at are the ones that are used to establish and maintain its session.
OK.
So basically, I understand what the cookies are.
Cookies will be having some information like, for example, think about it, the cookies that you eat.
There'll be something on the top.
And then if you open it, there'll be some chocolate chips like that.
So basically, that is what it would have to information and this information in the service to the,
you know.
But it does mean the reports are that you are accessing what data they should render to that particular
user based on the information and the cookie.
So that is the importance of the cookies.
So what is session when?
See what is session in the next video and also see how it is possible?
Yes.
Thank you.