I
I
Ibishka2020-08-03 13:14:02
PHP
Ibishka, 2020-08-03 13:14:02

Where to store php session id?

Where is it better to store the session id and should it be stored in a hashed form? In localStorage I think because the user can turn off the cookie. But is it safe?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2020-08-03
@Ibishka

The question is kind of strange.
The session ID does not need to be stored.
Its only function is to indulge in the server with every request.
The content of localStorage itself is not sent to the server. That is, I don’t see the point of putting the session ID there.
In addition to cookies, there are still no normal options.
If the user wants to disable cookies, this means that he wants to disable sessions as well.
Has every right.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question