By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,421 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

NEED COOKIE ADVISE

P: n/a
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 ?
Jun 6 '07 #1
Share this Question
Share on Google+
9 Replies


P: n/a
On Jun 6, 3:23 pm, "in da club" <xxwrote:
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

Jun 6 '07 #2

P: n/a
"in da club" <xxwrote in message
news:OU**************@TK2MSFTNGP06.phx.gbl...
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

Jun 6 '07 #3

P: n/a
For performance issue ;)
Jun 7 '07 #4

P: n/a
On Jun 7, 8:51 am, "in da club" <xxwrote:
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/

Jun 7 '07 #5

P: n/a
"in da club" <xxwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
For performance issue ;)
Er...
--
http://www.markrae.net

Jun 7 '07 #6

P: n/a
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 ;)
Jun 7 '07 #7

P: n/a
"in da club" <xxwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
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

Jun 7 '07 #8

P: n/a
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..
Jun 7 '07 #9

P: n/a
"in da club" <xxwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
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

Jun 7 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.