NEED COOKIE ADVISE

Discussion in 'ASP .Net' started by in da club, Jun 6, 2007.

  1. in da club

    in da club Guest

    I want to give a userid for each user and track it by userid. I need to
    store it in a cookie . What method will be beneficial for that process ?
    Using javascript or Server side scripting (asp.net) will be more effective ?
     
    in da club, Jun 6, 2007
    #1
    1. Advertising

  2. On Jun 6, 3:23 pm, "in da club" <xx> wrote:
    > I want to give a userid for each user and track it by userid. I need to
    > store it in a cookie . What method will be beneficial for that process ?
    > Using javascript or Server side scripting (asp.net) will be more effective ?


    Use ASP.NET Session Object.
    http://msdn2.microsoft.com/en-us/library/ms178581.aspx
     
    Alexey Smirnov, Jun 6, 2007
    #2
    1. Advertising

  3. in da club

    Mark Rae Guest

    "in da club" <xx> wrote in message
    news:...

    > I want to give a userid for each user and track it by userid.


    OK.

    > I need to store it in a cookie .


    Why do you need to store it in a cookie...?

    > What method will be beneficial for that process ?


    A Session variable.


    --
    http://www.markrae.net
     
    Mark Rae, Jun 6, 2007
    #3
  4. in da club

    in da club Guest

    For performance issue ;)
     
    in da club, Jun 7, 2007
    #4
  5. in da club

    Jason Kester Guest

    On Jun 7, 8:51 am, "in da club" <xx> wrote:
    > For performance issue ;)


    Ah, performance issue. Gotta squeeze that extra bit of performance
    out of our cookie-setting routine and do it by hand. Good plan.

    Look, Session uses Cookies. In fact, it sets a Cookie containing
    something that you can essentially think of as a UserID. As in, it
    does exactly what you're looking to do already. And it does it just
    as fast as you could by hand, so your "performance" claim only makes
    you look like you haven't done your homework.

    Look into FormsAuthentication. Chances are it does exactly what
    you're looking for.


    Jason Kester
    Expat Software Consulting Services
    http://www.expatsoftware.com/

    ---
    Get your own Travel Blog, with itinerary maps and photos!
    http://www.blogabond.com/
     
    Jason Kester, Jun 7, 2007
    #5
  6. in da club

    Mark Rae Guest

    Mark Rae, Jun 7, 2007
    #6
  7. in da club

    in da club Guest

    http://www.developerfusion.co.uk/show/4318/2/


    take a look

    Since session variables are stored on the Web server's memory, storing large
    objects in a user's session on a site with many simultaneous users can lead
    to reduced memory on the Web server. For more information on session
    variables see the Session Variables FAQs on ASPFAQs.com.


    I can use javascript to write and read cookies without exhausting my server
    resources ;)
     
    in da club, Jun 7, 2007
    #7
  8. in da club

    Mark Rae Guest

    "in da club" <xx> wrote in message
    news:%...

    > Since session variables are stored on the Web server's memory, storing
    > large objects in a user's session on a site with many simultaneous users
    > can lead to reduced memory on the Web server. For more information on
    > session variables see the Session Variables FAQs on ASPFAQs.com.


    Cookies are tiny pieces of textual information, no use at all for "storing
    large objects", so your comparison is meaningless.

    > I can use javascript to write and read cookies without exhausting my
    > server resources ;)


    What about the (increasing number of) people who disable cookies and/or
    JavaScript...?


    --
    http://www.markrae.net
     
    Mark Rae, Jun 7, 2007
    #8
  9. in da club

    in da club Guest

    ok you are right about disabling javascript cookies. My purpose is that find
    out pros and cons using javascript or server side cookies .. Thank you for
    your reply. I decide to use cookies in server side scripting..
     
    in da club, Jun 7, 2007
    #9
  10. in da club

    Mark Rae Guest

    "in da club" <xx> wrote in message
    news:%...

    > server side cookies


    There's no such thing as "server-side cookies" - a cookie is a small text
    file which resides on a client machine, not the server...

    Cookie support in browsers can be turned off, and cookies can be deleted...


    --
    http://www.markrae.net
     
    Mark Rae, Jun 7, 2007
    #10
    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. Jay
    Replies:
    1
    Views:
    292
    Alvin Bruney [MVP]
    Mar 2, 2004
  2. =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=

    Need your advise ????

    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=, Nov 2, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    420
    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=
    Nov 4, 2005
  3. Replies:
    0
    Views:
    390
  4. kackson
    Replies:
    0
    Views:
    334
    kackson
    Apr 14, 2004
  5. brucie
    Replies:
    0
    Views:
    869
    brucie
    Jun 24, 2003
Loading...

Share This Page