Solved

Multiple cookies with the same name?  Why?

Posted on 2007-11-26
4
1,171 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

786 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