A
A
Alexander Sharomet2016-08-12 20:35:41
PHP
Alexander Sharomet, 2016-08-12 20:35:41

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

1 answer(s)
M
Muhammad, 2016-08-12
@sharomet

Sessions must be stored on the server. The user has only a cookie by which he is identified: prntscr.com/c4xhxi

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question