Solved

Multiple cookies with the same name?  Why?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

911 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

22 Experts available now in Live!

Get 1:1 Help Now