简体   繁体   English

检查是否设置了第三方cookies

[英]Check if third-party cookies are set

Assuming that the user visits a domain A, how can I check that there is third-party cookies set within an iframe from domain B loaded unter the domain A or not?假设用户访问域 A,我如何检查在域 A 下加载的域 B 中的 iframe 中是否设置了第三方 cookies?

You can't check or read any cookie from different domain, your browser will not allow that, except if:您无法检查或读取来自不同域的任何 cookie,您的浏览器将不允许这样做,除非:

  • The Domain A has some JavaScript loaded from Domain B域 A 有一些从域 B 加载的 JavaScript
  • The JavaScript set some cookie JavaScript 设置一些cookie
  • Then the browser allow to send that cookie to Domain B when loaded in Iframe inside Domain A然后,当在域 A 内的 Iframe 中加载时,浏览器允许将该 cookie 发送到域 B

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM