Results 1 to 10 of 10
  1. #1
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270

    Unanswered: Cookie Less Session

    Hi,
    How do I handle session when cookie is disabled from client machine?




    Thanks,
    Rahul Jha

  2. #2
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    y no answer till now?

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    This is why.
    George
    Home | Blog

  4. #4
    Join Date
    Sep 2006
    Posts
    265
    If cookies are disabled I don't think Session variables will work. The alternative is "carry" these variables via Querystrings from Page to Page. This is I would not recommend.

    I only use Session variables for back navigation and if visitors have Session Variables disabled the back navigation does not work, instend visitors go to the first page rather than the Page they exited. This does not affect the overall performance of the website.

    Simon

  5. #5
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    my question is, as how do the web server identify a particular user / client when the session is disabled.

  6. #6
    Join Date
    Sep 2006
    Posts
    265
    This depends if the user logs in or not.

    We are not interested in the users so they are anonymous.

    Heres a script:

    Code:
    <HEAD>
    <title>Server Variables</title>
    </HEAD>
    
    <body bgcolor="#FFFFFF" text="#000000" link="#804040" vlink="#008080" alink="#004080">
    <HTML>
    <BODY>
    <div align="left">
    <table border="0" cellpadding="0" cellspacing="0" width="750">
    <tr>
    <td valign="top" align="left" width="150"><font face="Arial" size="2" color="#FF0000"><b>Variable Name</b></font></td>
    <td valign="top" align="left" width="600"><font face="Arial" size="2"><b>Value</font></b></td>
    </tr>
    <%
    for each name in request.servervariables
    %>
    <tr>
    <td valign="top" align="left" width="150">
    <font face="Arial" size="1" color="#FF0000">
    <%= name %></font></td>
    <td valign="top" align="left" width="600">
    <font face="Arial" size="1"><%= request.servervariables(name) %></font></td>
    </tr>
    <%
    Next
    %>
    </table>
    </div> 
    </BODY>
    </HTML> 
    </BODY>
    
    </HTML>
    Simon

  7. #7
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    Simon,
    Thnkx 4 ur response. But what i am looking for is, not the same that ur trying to respond. My question is how do a session is maintained for any user when the cokkies is been disabled from the client machine? as we all know that a session id is been created at the server end and is send across to the client in form of cookies along with the http header. now when the cookies itself is been disabled at the client end, then how do the server knows that the new request that has coem to the server from the client is from the existing user / client or it is from a new user / client.



    thnkx,
    rahul jha

  8. #8
    Join Date
    Sep 2006
    Posts
    265
    All the cookie is don't is remembering information. Its like storing Telephone Numbers in your phone. You can still dial the number or lookup it up on your caller list. So without cookies when you revisit there is no information locally so you are treated as a fresh visitor.

    Simon

  9. #9
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    Ok, Lemme give some scenarios........

    1. A request was send to the web server for some page, say "a.asp"
    2. Client recieves the page "a.asp" and also the cookie file along with the http header to uniquely identify the client.
    3. Now some sesion variables are created and stored some values in it. Say Session("User") = 'Rahul' and Session("Password") = 'Pass'.
    4. And now I have disabled the cookie at the client's machine, and sends the request to the server for some page say "b.asp"
    5. Now as the cookie is disabled at the cliemt machine.......... I have following question from the above scenarios..........


    ---- Will the server recognise the request as the fresh one or will it consider the 2nd request from the client?

    ---- Will I be able to access the Session variables session("User") / Session("Password") in the page "b.asp"?



    Thanks,
    Rahul Jha

  10. #10
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    answer meeeeeeeeeeeeeee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •