网站可以做些什么来整合第三方Cookie [英] Is there something a site can do to incorporate third party cookies

查看:91
本文介绍了网站可以做些什么来整合第三方Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个电子商务网站上工作。我们要做的部分工作是为某些客户提供定制的物品。最近,一些非技术管理人员承诺,我们可以将结帐流程整合到此类客户的网站中。我们弄清楚如何做到这一点的唯一方法是使用iframe(我知道,我也不喜欢)。问题是该站点的大多数客户无法退房,因为我们使用Cookie来确定要显示的自定义项目。浏览器将我们的cookie识别为第三方,并且几乎每个人都应该关闭第三方cookie。如果答案是肯定的,我会感到震惊,但是有什么解决方法吗?也就是说,托管我们iframe的网站能否以某种方式提供必要的cookie?

I work for an e-commerce site. Part of what we do is to offer customized items to some clients. Recently some non-technical management promised that we could incorporate our check-out process into one such client's website. The only way we've figured out how to do this is by using an iframe (I know, I don't like it either). The issue is that most customers of this site are unable to check out because we use cookies to determine which custom items to display. Browsers are recognizing our cookies as third party and almost everybody has third party cookies turned off, as they should. I'm going to be shocked if the answer is yes, but is there any workaround for this? ie can the site hosting our iframe somehow supply the necessary cookie?

推荐答案

尝试使用不可见的插页式广告。

Try an invisible, interstitial page.

基本上,托管站点会向您域中的站点发出重定向,然后可以自由设置cookie(因为此时实际上是第一方)。然后,您的站点立即重定向回托管站点。此时,您新创建的Cookie将对托管站点不可见,但此后对您的iFrame页面可见。

Essentially the hosting site would issue a redirect to a site within your domain, which is then free to set cookies (because at this point is is actually the first party). Then your site immediately redirects back to the hosting site. At this point your newly-created cookies will be invisible to the hosting site but visible to your iFramed page henceforth.

不幸的是,托管站点每次必须cookie将会被更新,但是双向重定向可能会发生得如此之快,以至于几乎不会引起注意。希望您的系统只需要设置一次cookie。

Unfortunately the hosting site will have to do this every time a cookie is to be updated but the double-redirect can happen so quickly they'll hardly notice. Hopefully your system only needs the cookies to be set once.

这篇关于网站可以做些什么来整合第三方Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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