VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
cookies vs localStorage vs sessionStorage - Beau teaches JavaScript

cookies vs localStorage vs sessionStorage - Beau teaches JavaScript

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
What's the difference between cookies, local storage, and session storage? They are all ways to store data in a user's browser but they each have different uses. - Code: http://codepen.io/beaucarnes/pen/KmeRMx?editors=0011 - Beau Carnes on
Date: 2022-03-14

Comments and reviews: 8


Great video! Liked how you summarized all in one table. I don-t think this is true though 1:37 cookies are not stored on the server. They can be set by the server with a response header (set-cookie) and client sees that header and store it in the browser. The other way is through javascript document.cookie. But yeah only on the browser last time I checked.
reply

Great video... Thanks for sharing! Do you know of an approach to store values like these on a cloud bucket without using server side code like PHP? Sort of like a database but on a per user basis? Can it be done on javascript? Thanks
reply

dude don't just show the code. try to explain what and why for each, if possible. You are creating coders, when you could create software engineers. Don't just write ifs, think about why are writting that if.
reply

But looking at my php backed.
The session only destroyed once browser closed instead of tab close.
Also, isnt session is kept in server side?
Or ttheres type of session?

reply

Great video, one question : what would you recommend going for, if I want a popup as an example, to not appear if the user already seen it in the last 30 days ?
cheers

reply

Why do you say that cookies and local storage can be access on any window? Are not they tied to a domain? I set a local storage in one tab and I couldn't see it in another
reply

Thank you very much. but i am not clear with your last point. We are sending token (stored in local storage ) on every request for accessing the resource. Please help me.
reply

145/5000-
My site shows the position of people every few seconds, but I do not know how to save the position in the theme form in my database. Someone can do it.

reply
Add a review, comment






Other channel videos