Sessions are safer than cookies and hidden fields because they are stored on the server. Cookies usually should not contain confidential data, even encrypted, as users have direct access to them. Hidden fields are also sent to the client, but simply are not displayed. Therefore, using tools such as FireBug , you can easily display this content.
There are various places in which you can store the session, for example, in memory (if you do not use them a lot) or support their SQL server. You can get more session information here . Sessions are secure because they are stored on the server side.
source
share