in reply to How do you do sessions in Web Sites

Having state data in the url might be usefull - for sending the address to an exact state of the server. But user id in the address does not seem like a good idea to me - the receiver of a sent bookmark would login using the senders user id.

I think for authentication you can use only cookies or http authentication, no paths (urls).

  • Comment on Re: How do you do sessions in Web Sites

Replies are listed 'Best First'.
Re^2: How do you do sessions in Web Sites
by riczho (Initiate) on Sep 29, 2005 at 01:45 UTC
    Wow-- looks like you kinda reinvented the wheel-- CGI::Session should sessions-- and you can include the session id in the URL.
      I don't understand where I am reinventing something. If the session is in the url and a session is owned by someone then if someone else uses that url he will be logged in as the original user. This is confusing from many points of view. So ideally you should split the authentication part of the session from the state part and code in the url only the state part.

      To put it in other words there is a public and private part of the session and since urls are mostly treated as public you should not use urls for the private part of the session. This is a general remark. If you want to concentrate on CGI::Session then we can analyze if it fits to this kind of usage.