Answer the question
In order to leave comments, you need to log in
Where is the best place to store sessions?
Hello.
Tell where it is better to store sessions. On the server or at the user's computer?
For example, a user visits the site, I encrypt his password and save it on the user's local computer along with the login. Is it correct?
I just heard about another way:
The user enters the site, I save a cookie with some code on his computer, and the session itself is saved to a file on the server. The next time I log in using this code, I can find the session and load the user data from there. Correctly?
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question