What are cookieless sessions?
Asked Answered
T

4

14

In ASP.NET, I'm a bit confused about role of cookies in session state. Whats is the difference between normal session state and cookieless session state?

Tertullian answered 16/2, 2010 at 13:12 Comment(0)
E
24

Normal session state involves providing a cookie. The cookie contains a session identifier which is used by the website to match visitors up with their respective session values.

Cookieless session state uses the same principles, but doesn't use cookies to pass the session identifier around. Normally, this is passed as a parameter on the querystring.

e.g.

http://www.somewebsite.com/page.aspx?sid=jrkwojeqrojq3op349023231234r23rf2

Engedus answered 16/2, 2010 at 13:15 Comment(0)
T
4

ASP.NET is able to modify relative links found within the page and embed the Session ID in the URLs instead of storing it in a cookie.

Thus, as long as the user follows the path of links the site provides, session state can be maintained without using cookies. However, if the end user re-writes the URL, the session state instance will most likely be lost.

Further reading:

Twospot answered 16/2, 2010 at 13:15 Comment(0)
J
3

The cookie less session doesn't use a cookie is user's browser to store session state. Instead it stores the session either in the page itself or in the url. Read here for a comparison.

Jenijenica answered 16/2, 2010 at 13:14 Comment(0)
P
1

cookieless means that the sessionId is munged into the url for each request as opposed to setting a cookie on the browser.

Polytheism answered 16/2, 2010 at 13:14 Comment(1)
i'm an old fart. i know. luckily i have yet to find cause to use the verb 'thunk'Polytheism

© 2022 - 2024 — McMap. All rights reserved.