我可以使用< img>标签以跨域发送Cookie? [英] Can I use an <img> tag to send cookies across domains?

查看:243
本文介绍了我可以使用< img>标签以跨域发送Cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看这种情况:


  1. www.websitea.com img 标记的 src 属性 www.websiteb.com/image.aspx?id = 5 style =display:none

  2. www.websiteb .com 除了名称为引荐来源的Cookie和 5 (已验证的查询字符串创建服务器端。)

  1. www.websitea.com displays an img tag with a src attribute of www.websiteb.com/image.aspx?id=5 and style="display:none"
  2. www.websiteb.com returns an clear image, in addition to a cookie with a name of referrer and value of 5 (created server-side from validated querystring.)

www.websitea.com www.websiteb.com

Would the cookie be created on domain www.websitea.com or www.websiteb.com?

确保一系列重定向与querystrings和实现跨域cookie,但我想出了这个形象的想法一点。我想我也可以使用 iframe

Currently I'm sure a series of redirects with querystrings and to achieve cross-domain cookies, but I came up with this image idea a little ago. I guess I could also use an iframe.

谢谢!

推荐答案

查看:
跨域 - 用户跟踪

有人提到使用1x1图片在网域之间进行跟踪。

Someone mentions using a 1x1 image for tracking across domains.

这篇关于我可以使用< img>标签以跨域发送Cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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