Is session id machine independent and unique?

M

Matt

I want to understand if session id is unique in a machine? For example, if I open
5 different web sites in 5 web browsers, I should get 5 unique session ids
for each browser. However, the session id I get in machine A can be
the same as in machine B? I think session Id is generated by the web server?
And how session id is generated?

Please advise. Thanks
 
A

Andy Flowers

The format of a Session Id is AFAIK unique to each and every vendor.

Session Ids have the possibility to be reused though. If the session on
machine A times out then that id could be regenerated for machine B. One
this that should be true, however, is that not 2 distinct sessions, whether
from different browser sessions on a single machine or different machines,
should have the same session Id at the same point in time.

To get a handle on how it 'could' be implemented why not take a look at the
Tomcat source code/documentation and havea look at how it handles sessions ?
http://jakarta.apache.org/tomcat/index.html
 
M

marcus

or better yet, learn to read

"Returns a string containing the unique identifier assigned to this
session. The identifier is assigned by the servlet container and is
implementation dependent."

this is not hard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top