Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To recognise the Client

 
Doshi Milan
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hllo Friends,
I was asked in an interview as to how will the Web Server recognises, i.e distinguishes between the n number of clients it is entertaining. i.e in other words, the sesions are maintained but when the client say C1 again comes back how will the server know that it is C1 and not C2 or C3 ..etc.
Thanks in advance,
Regards,
Milan Doshi
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Through the Session objects.

Which are implemented one of two ways...

The server sets a cookie containing the session id and that cookie gets sent with each subsequent request, enabling the server to track who is who.

or if cookies are disabled, the server can use URL rewriting (it writes the session id into the URL), and this way can also keep track of who is who.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic