By using an iframe hosted on Domain A, you can store all of your user data on Domain A, and reference that data by posting requests to the Domain A iframe. Thus, Domains B, C, etc. can inject the iframe and post requests to it to store and access the desired data.
I can certainly imagine a scenario where you are hosting several different apps on subdomains and another app on the domain and the parent domain would be stomping over all the cookies. I think what safari is doing is more correct.
When a cookie is set from a webserver, it can be for a specific domain or for a domain and all its subdomain. This article will cover few scenarios and how to set cookies for those scenarios. We’ll use php code to set cookies from server side but this article is applicable to other server side languages also.
And now back to the topic at hand. One of the things that seems to be a hot topic in Universal Analytics is cross-domain tracking. I've never really tackled the beast head-on, since there's such a wealth of excellent articles about it out there. However, I have taken a plunge into the deep end with some specific stuff, such as iframe and subdomain tracking.
If I understand your scenario correctly you want to store the cookie that comes from one domain in page belonging to another domain.I think cookie is associated with a particular domain.HttpCookie has a property Domain which contains the domain of the cookie. I think you can try to set the Domain property for this scenario.
To find a particular cookie, we can split document.cookie by ;, and then find the right name. We can use either a regular expression or array functions to do that. We leave it as an exercise for the reader. Also, at the end of the chapter you’ll find helper functions to manipulate cookies. Writing to document.cookie. We can write to document.
Cookie overflow. If you’re having cookie problems I feel bad for you, son. I’ve got 99 cookies and my domain’s ain’t one. This is a slightly more advanced attack that exploits the hard limit that all web browsers have on the number of cookies that can be set per domain.
How to limit cookie for a particular domain in ASP.NET? In earlier articles, we learnt how to create, read, expire cookies and limit the scope of the cookies to a particular folder of the website. In this article.
ASP.NET 2.0 can do all this for you via a Web.config setting. GOTCHA: If you do this in your ASP.NET 1.1 app and then run your 1.1 app under 2.0 without changes, be aware that ASP.NET 2.0 will append ANOTHER HttpOnly after every cookie giving you the value TWICE. You'll then need to turn if off in web.config as your code would be handling it.
When the user navigates to either website, the piece of code loaded from ad.doubleclick.net is from a different domain than the URL in the user’s browser, so the cookies set in ad.doubleclick.net are considered third-party cookies. You can read more about the difference between first-party and third-party cookies in our previous post.