Solved

Multiple cookies with the same name?  Why?

Posted on 2007-11-26
4
1,169 Views
Last Modified: 2013-11-06
Using trace I see that I have multiple cookies with the same name?  This is causing problems because I am loggin into many different accounts on the same site I am developing and values are getting confused.
I always thought that setting a cookie value overwrote a previous cookies value not created a duplicate, this is using IE 7 if that makes a difference.

Here is a list of cookies for example, note the duplicate ShipState, EmailAddress, CustomerID:

ShipState FL
EmailAddress jim@alivemedia.com
CustomerID 833d090c-c339-48be-bb4j-2567cfb1cd8c  
EmailAddress lisa@alivemedia.com 34
CustomerID e9207cd4-fdf4-41e9-8878-cf91f4dc1qea
ShipState FL
0
Comment
Question by:alivemedia
4 Comments
 
LVL 5

Expert Comment

by:TheGD
ID: 20505210
Use server side script like ASP.net to set cookies instead of using javascript.
0
 
LVL 2

Author Comment

by:alivemedia
ID: 20507347
I figured it out, and I am using asp.net to set them.

The problem was I needed to set the path for the cookie.  Apparently in IE 7 cookies set from different folders get a different path property by default - or something like that.

Anyways specifying a path solves this problem and it works as expected now.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 20678840
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now