session id is determined by the cookie?

Discussion in 'Java' started by jrefactors@hotmail.com, Dec 31, 2004.

  1. Guest

    When we open a new web browser, all the windows that are open from that
    web browser belong to the same session. However, if we open a new web
    browser, then it will be different sessions. Is that the correct
    concept?

    Another question is if session id is generated by the web server?
    Session ID is determined by the cookies? Otherwise, how can the web
    server know this is new session, or old session?
    , Dec 31, 2004
    #1
    1. Advertising

  2. Daniel Tryba Guest

    wrote:

    FUP to comp.lang.php (and there is generally no reason to crosspost
    between clj.help and clj.programmer).

    > When we open a new web browser, all the windows that are open from that
    > web browser belong to the same session. However, if we open a new web
    > browser, then it will be different sessions. Is that the correct
    > concept?


    No, depends on browser and how the new "windows" get opened.

    > Another question is if session id is generated by the web server?


    Atleast for PHP the client can set the sessionID.

    > Session ID is determined by the cookies?


    Could be. Depends on server configuration.

    > Otherwise, how can the web server know this is new session, or old
    > session?


    The webserver doesn't care (atleast with PHP), if you actually care you
    have to write your own code to do sessionID generation and checking.
    Daniel Tryba, Dec 31, 2004
    #2
    1. Advertising

  3. newB Guest

    1) no, that's wrong. everything would be saved to ur pc. just like a
    cookie

    2) session is saved to local pc as the cookies
    newB, Jan 1, 2005
    #3
  4. Sudsy Guest

    newB wrote:
    > 1) no, that's wrong. everything would be saved to ur pc. just like a
    > cookie
    >
    > 2) session is saved to local pc as the cookies


    I'm afraid that it's you who's wrong. Some clients don't accept cookies
    so there has to be an alternate way of maintaining session state. It's
    typically achieved through the use of "URL rewriting". I suggest that
    you refer to the applicable documentation.
    Sudsy, Jan 1, 2005
    #4
  5. R. Rajesh Jeba Anbiah, Jan 1, 2005
    #5
  6. Guest

    session is not belongs to the web browser...when the first time a
    request come from a user to a server the sever automitacally give hime
    a session.. what ever the browser the user is use.
    >>u can check this by copyeing the url and paste it in another browser

    after a successfulyy login-- u see that all the autheticate page you
    are browsing

    cockies is used by some of the web hoster to track u .to find that u r
    browsing their site for the first time or for the seccond time . when
    basically we check on save pass check box this is save in our hard disk
    as cockie. so seccond time when we logon to that particuler site that
    cockie is send user name and password for us.
    >>u can check this by opening cockie folder what is under document and

    settings E:\Documents and Settings\UR_USER_NAME\Cookies folder and if u
    delete a cockie what may e set for yahoo or hotmail so nexttime when u
    going to logon their pages the auto loging system will not work

    HTTP protocols are stateless, so one state dont know about other state.
    session id is nedded to be handeld by server side scipting .usually it
    is handeld by programer. so it is basically our responsibility to play
    with a session, check it in every pages.. send it to one page to other
    u can do that in many when like by checking when u give him the id
    their is many way u can handel a id, like for a page-the id will valid
    only in a page in a whole session or for some default timing.
    if in ur websites theire is no securitu like no user name and login
    system then u can easily forget aout this session and cockie things
    bye
    take care
    , Jan 3, 2005
    #6
  7. Sudsy Guest

    wrote:
    > session is not belongs to the web browser...

    <snip body of post which gave me a headache trying to understand...>

    A session is shared between the client and the server. The client or
    web browser has to present their credentials every time they attempt
    to access the server so that the server can associate the request
    with an existant session. Whether via cookies or URL rewriting, the
    functionality is the same.
    You are correct about one thing: HTTP /is/ stateless. Adding state
    to the conversation is what sessions are all about.
    Sudsy, Jan 3, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. have_a_question_!
    Replies:
    1
    Views:
    703
    Mark McDougall
    Nov 21, 2005
  2. Michael Hogan
    Replies:
    2
    Views:
    297
    Michael Hogan
    Feb 20, 2004
  3. Gery D. Dorazio
    Replies:
    3
    Views:
    454
    Martin Honnen
    Sep 7, 2004
  4. Simon Harris
    Replies:
    0
    Views:
    6,368
    Simon Harris
    May 10, 2005
  5. Replies:
    2
    Views:
    897
Loading...

Share This Page