NEED COOKIE ADVISE

  • Thread starter Thread starter in da club
  • Start date Start date
I

in da club

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 ?
 
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/
 
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 ;)
 
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...?
 
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..
 
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...
 
Back
Top