Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Using Cookies and JWTs for Secure Authentication!
You have completed Using Cookies and JWTs for Secure Authentication!
Preview
Cookies vs Sessions is an ongoing debate. We will explain what the difference is between the two and when you would use one over the other.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
The debate is should you store your
details in cookies or sessions?
0:00
Although there is no 100% correct
answer for this debate, I'm going to go
0:01
over the differences between both, with
the positives and negatives of each one.
0:06
A lot of people will argue that
using sessions is the correct way
0:12
of storing information about the user.
0:15
The reason I get from a lot of people
when asking this is that it's easy.
0:18
Although this argument is true,
it is also easy for
0:22
a hacker to gain access to the same
session for cross-site scripting attacks.
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up