ユーザーを識別するために Cookie に依存する Web サービスをセットアップしようとしています。場合によっては、これらはファースト パーティの Cookie です。つまり、ユーザーは自分のサイト (my-site.com など) でそれらを受け取ります。また、my-site.com から提供された画像を使用して、別のサイトから Cookie が設定/読み取られる場合もあります。
問題は、IE (少なくとも IE8) では、どちらの場合も Cookie が正しく設定され、読み取られますが (セッション Cookie ではなく永続的)、それらは 2 つの別個の Cookie として扱われることです。つまり、私のサイトは 2 つの異なる UID を同じユーザーに割り当てており、他のサイトに対して正しいサービスを実行できません。
HTTP 応答に P3P ヘッダーを設定しています (これがないと、サードパーティの Cookie はセッション Cookie として扱われます)。
Chrome と Mozilla では、これは正しく機能します。つまり、ファーストパーティとして設定された Cookie は、別のサイトから接続するとサードパーティとして返され、その逆も同様です。
編集
Fiddler からの HTTP 要求/応答のダンプは次のとおりです。
HTTP リクエスト: (ファースト パーティ)
GET http://my-site.com/redirect_to?eid=100 HTTP/1.1
Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Accept-Language: he-IL
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; Tablet PC 2.0)
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Host: my-site.com
Cookie: uid=8943448674338503051
HTTP レスポンス: (ファースト パーティ)
HTTP/1.1 302 FOUND
Date: Thu, 13 Jun 2013 12:22:31 GMT
Server: Apache/2.2.22 (Ubuntu)
P3P: CP="CUR CUS OUR BUS UNI NOI"
Location: http://google.com
Set-Cookie: uid=8943448674338503051; expires=Tue, 12-Jun-2018 12:22:31 GMT; Max-Age=157680000; Path=/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
HTTP リクエスト: (サードパーティ)
GET http://my-site.com/pixel?eid=100 HTTP/1.1
Accept: */*
Accept-Language: he-IL
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; Tablet PC 2.0)
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Host: my-site.com
Cookie: uid=6926889931739290944
HTTP レスポンス: (サードパーティ)
HTTP/1.1 204 NO CONTENT
Date: Thu, 13 Jun 2013 12:22:12 GMT
Server: Apache/2.2.22 (Ubuntu)
P3P: CP="CUR CUS OUR BUS UNI NOI"
Content-Length: 0
Set-Cookie: uid=6926889931739290944; expires=Tue, 12-Jun-2018 12:22:12 GMT; Max-Age=157680000; Path=/
Vary: Accept-Encoding
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8