Is it possible for any code loading in an iframe set first party cookies?
E.g. I have a site: www.my-website.com and I need to load some content from third party provider www.third-party-site.com for legitimate purposes. But (for obvious security reasons) I do not want to allow them to be able to set (or read) any first party cookies (i.e. cookies with the domain www.my-website.com - they are welcome to set any cookies of their own domain www.third-party-site.com).
Is the above possible under certain conditions or not possible at all:
- iframe is not sandboxed?
- if the iframe code loads say an image that has header cookies
- any other conditions?
- some browsers allow vs. others do not?
My understanding is that this is not possible at all and most answers on SO etc. seem to support this - but some are pointing to examples where Facebook has a workaround to this in certain conditions etc. Hence thought to clarify.