在iframe中设置Cookie - 不同的域 [英] Setting cookie in iframe - different Domain

查看:4388
本文介绍了在iframe中设置Cookie - 不同的域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将我们的网站作为iframe集成到在另一个域上运行的另一个网站。看来我们不能设置cookie。以前有人遇到过这个问题吗?任何想法?

We have our site integrated as an iframe into another site that runs on a different domain. It seems that we cannot set cookies. Has anybody encountered this issue before? Any ideas?

推荐答案

由于您的内容正在从远程域加载到iframe,所以它被归类为第三方Cookie

Since your content is being loaded into an iframe from a remote domain, it is classed as a third-party cookie.

绝大多数第三方Cookie由广告客户提供(通常标记为跟踪Cookie 通过反恶意软件软件),许多人认为他们是侵犯隐私。因此,大多数浏览器都提供阻止第三方Cookie的功能,这可能是您遇到的问题的原因。

The vast majority of third-party cookies are provided by advertisers (these are usually marked as tracking cookies by anti-malware software) and many people consider them to be an invasion of privacy. Consequently, most browsers offer a facility to block third-party cookies, which is probably the cause of the issue you are encountering.

这篇关于在iframe中设置Cookie - 不同的域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆