简体   繁体   中英

Prevent my own site from setting (3rd party) cookies

Is there a way to make my own site (eg by header or js) prevent third party cookies (in my specific case one set by HTTP header of a banner embedded and one set by my twitter widget's javascript) from being set?

This should not affect the user's session (set by HTTP header as expires on session end).

The obvious alternative would be getting rid of those 3rd party includes by letting my server cache the banner and implementing the twitter feed myself using the api, but especially the latter case would mean much more work.

不能。如果您引用HTML / CSS / JavaScript中其他站点的内容,则除非这些站点通过内容安全策略明确阻止所有来自远程站点的内容,否则就不能对这些站点的操作施加任何进一步的限制。首先合并内容的原因)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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