首页 > Uncategorized > 关于第三方cookie

关于第三方cookie

  • 本文链接地址:http://zhubaining.com/blog/2009/07/03/archives/%e5%85%b3%e4%ba%8e%e7%ac%ac%e4%b8%89%e6%96%b9cookie
  • 作者:zhubaining

site1的a页面里面通过img或者iframe等方式引用了site2的url b。
如果ulr b的response想给site2的某一个域下设置cookie,默认情况下是不允许的,除非:
1. 浏览器允许第三方cookie:Firefox中勾选 “选项-> Cookies -> 接受第三方cookie” (这个选项貌似默认勾选的);
2. 或者:response中包含P3P的header

注:
1. third-party cookies:cookies that are stored by a site other than the one you are visiting are called third-party cookies or foreign cookies.
2. P3P:The Platform for Privacy Preferences Project, or P3P, is a protocol allowing websites to declare their intended use of information they collect about browsing users. Designed to give users more control of their personal information when browsing, P3P was developed by the World Wide Web Consortium (W3C) and officially recommended on April 16, 2002.
3. 如果想悄悄地访问其他域的网址(让它写“第三方cookie”),大可不必用iframe,因为这样会导致很多多余的请求,用img就可以了,它会跟随跳转到最终页,而又不会发起很多http get来获取那个页面中包含的资源。
4. IE浏览器默认的隐私设置为中,而这个会:

  • 阻止没有合同隐私策略(精简的计算机可读的隐私声明)第三方网站的 Cookie
  • 阻止不经您暗示同意就使用个人可标识信息的第三方网站的 Cookie
  • 关闭 Internet Explorer 时,从计算机上删除不经您暗示同意就使用个人可标识信息的第一方网站的 Cookie
分类: Uncategorized 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.