Internet explorer Internet Explorer中的第一方和第三方cookie

Internet explorer Internet Explorer中的第一方和第三方cookie,internet-explorer,http,cookies,http-headers,session-cookies,Internet Explorer,Http,Cookies,Http Headers,Session Cookies,我正在尝试建立一个依赖cookies来识别用户的web服务。 有时这些是第一方cookie,即用户在我的网站(例如my site.com)上收到它们;其他时候,使用my-site.com提供的图像从其他站点设置/读取cookie 问题在于,在IE中(至少在IE8中),虽然在这两种情况下cookie都被正确设置和读取(持久性cookie,而不是会话cookie),但它们被视为两个单独的cookie。也就是说,我的站点为同一用户分配了两个不同的UID,无法为其他站点执行正确的服务 我正在HTTP响应

我正在尝试建立一个依赖cookies来识别用户的web服务。 有时这些是第一方cookie,即用户在我的网站(例如my site.com)上收到它们;其他时候,使用my-site.com提供的图像从其他站点设置/读取cookie

问题在于,在IE中(至少在IE8中),虽然在这两种情况下cookie都被正确设置和读取(持久性cookie,而不是会话cookie),但它们被视为两个单独的cookie。也就是说,我的站点为同一用户分配了两个不同的UID,无法为其他站点执行正确的服务

我正在HTTP响应中设置P3P头(没有它,第三方cookie将被视为会话cookie)

在Chrome和Mozilla中,这是正确的,即设置为第一方的cookie在从另一个站点连接时返回为第三方,反之亦然

编辑 以下是来自Fiddler的HTTP请求/响应转储:

HTTP请求:(第一方)

HTTP响应:(第一方)

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/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
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/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