I'm exploring cookies and sessions [I'm using them with respect to ASP.NET C# microsoft framework]
Learnt how sessions and cookies work here and here.
My take on it is like,
Once a user logs in and establishes a session, he or she is given a session id to track them further.
Also, this
sessionId
can be stored on a Server, like SQL Server or a InProc, meaning it is stored on the issuing server or on a cache, Redis Cache.
My question is like,
I can understand that the sessionId
is stored in a memory and being sent with every request (since HttpSessions are stateless) as HttpHeaders.
- When we talk about storing sessions in a memory, which memory are we talking about ?
- If we are storing them in a cookie, what If I go and modify the cookie ?
- If I can modify them, what If I change the
sessionId
and supply in a newsessionId
?