473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

NEED COOKIE ADVISE

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
9 1268
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
"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
For performance issue ;)
Jun 7 '07 #4
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
"in da club" <xxwrote in message
news:eT**************@TK2MSFTNGP04.phx.gbl...
For performance issue ;)
Er...
--
http://www.markrae.net

Jun 7 '07 #6
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
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rene | last post by:
I'm trying to learn how to use python for cgi scripts... I created a form that submits some info that I put in a cookie. Then the script calls itself and reads the cookie, and displays a...
8
by: Matt | last post by:
I want to know if user disable cookie, will the session still working? Actually I remember we could disable cookie in IE before (not sure what version, but I couldn't see the option anymore. Now I...
1
by: Rahul Chatterjee | last post by:
Hello All I have an asp page problem (the nature is slightly complex so please bear with the long winded explanation). We have a sandbox front end domain and a sandbox backend domain. The...
7
by: ehendrikd | last post by:
hi all i need some clarification on how the php session work in relation to cookies. we have a web site where users need to log in. a few of our users were having troubles with their browser...
2
by: jrefactors | last post by:
There are two cookie types: 1) session cookie. 2) persistent cookie is the same as tracking cookie? Is that correct? For windows machine, the files in C:\Documents and...
3
by: Ben Amada | last post by:
Every time a user visits a particular page, I'm using the code below to add a cookie that expires in 1 day. My question is, a user may visit this page a few times within one day. Before adding...
1
by: AnthonyC | last post by:
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application. When user log onto the application, an in-memory (per-session)...
1
by: =?Utf-8?B?VCBSYXkgSHVtcGhyZXk=?= | last post by:
I have an ASP.NET 2.0 web app using forms authentication and an ASP.NET Membership database. Internal users access the app from the intranet, but they are authenticated by the membership module....
1
by: tohnsm | last post by:
Hi. I have been trying to create a cookie container. But the cookie I have stored is not correct. Below is the code: request = CType(WebRequest.Create("....."), httpWebRequest) ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.