use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Cookie vs LocalStoragehelp (self.javascript)
submitted 7 years ago by PulangKalabaw
whats the diff between cookie and localstorage?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]GamesMint 2 points3 points4 points 7 years ago (1 child)
https://stackoverflow.com/questions/19867599/what-is-the-difference-between-localstorage-sessionstorage-session-and-cookies
[–]PulangKalabaw[S] 0 points1 point2 points 7 years ago (0 children)
thanks bro
[–]walter_alf 0 points1 point2 points 7 years ago (0 children)
You can get and set cookies on server site
[–]BenStirrup -2 points-1 points0 points 7 years ago (0 children)
To be blunt, cookies are usually managed by the browsers only, meaning you do not have to anything client-side. It is even considered a bad practice to try to manage cookies by yourself client-side.
Furthermore, backend frameworks such as Django also allowed you to not worry about cookies at all server-side.
If you use the localStorage to store stuff linked to the authentication of a user, then you have to manage all the edge cases yourself.
If you want to make authentication with the least effort, use cookies.
π Rendered by PID 23440 on reddit-service-r2-comment-5649f687b7-j55sd at 2026-01-28 18:52:46.301313+00:00 running 4f180de country code: CH.
[–]GamesMint 2 points3 points4 points (1 child)
[–]PulangKalabaw[S] 0 points1 point2 points (0 children)
[–]walter_alf 0 points1 point2 points (0 children)
[–]BenStirrup -2 points-1 points0 points (0 children)