简体   繁体   English

如何防止网站通过图像将 cookie 放入我的网站?

[英]How can I prevent a site from putting cookies in my site through an image?

I am embedding a photobucket image on my site.我在我的网站上嵌入了一个 photobucket 图像。 Unfortunately, when I look at what cookies my site uses, I find that photobucket has forced their cookies onto my site.不幸的是,当我查看我的网站使用哪些 cookie 时,我发现 photobucket 已将他们的 cookie 强加到我的网站上。 How can I remove the cookies from my site?如何从我的网站中删除 cookie?

饼干问题

Here is a codepen demonstrating the issue, and here is the relevant source code:这是一个演示该问题的代码笔,这是相关的源代码:

https://codepen.io/Thisisntme/pen/zNpvWP https://codepen.io/Thisisntme/pen/zNpvWP

<img src="https://i349.photobucket.com/albums/q394/123madskillz/logo_zpsohtpmz4i.png">

Is this normal phenomenon?这是正常现象吗? Photobucket seems to put its cookies on stackoverflow when I link the image as well.当我链接图像时,Photobucket 似乎也将其 cookie 放在 stackoverflow 上。

They're not your cookies, they're not on your site, and you have no control over them.它们不是您的 cookie,它们不在您的网站上,您无法控制它们。 They're relating to another domain.它们与另一个域有关。 They're being added to your browser , not your site.它们被添加到您的浏览器,而不是您的网站。

If you don't want these things to show up don't use Photobucket.如果您不想显示这些内容,请不要使用 Photobucket。 When you link to external assets you surrender all control over what those assets might do to someone's browser.当您链接到外部资产时,您就放弃了对这些资产可能对某人的浏览器执行的操作的所有控制权。

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

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