Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why the cookie is being shared in different applications?

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

My subject line is way too ambiguous and I apologize for that.

Coming to my question, I know that most web applications would store certain details like name, address, phone number etc into cookies and browsers store them. Now on subsequent requests, the applications can read these cookies and may use the values. This makes sense if the same application is able to read the cookie that actually created it. But in some cases, I observed that different applications, say amazon and ebay, how come they are able to read the same cookie and pre-populate certain fields. May be that cookie was not created by neither of those. May be I'm wrong or May be something else. But my question is, would it be really possible to have two different applications share the same cookie. If yes, logically how is this possible.

Thanks
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, cookies are not shared between different web sites. They have a so-called "same domain" policy, where cookies that are set by, say, amazon.com can't access cookies set by ebay.com. (It can be further restricted so that cookies set by www.amazon.com are not even accessible by foobar.amazon.com, but that's not germane to your question.)

But what you're seeing is most likely not the effects of cookies. It fact, it's rare (and not good design or security) for personal data to be stored in cookies. The site may either have stored your data on the server when you last accessed it, and is now pre-populating the page, or your browser may have remembered the values from your last visit (so-called "form auto-fill").
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you may be seeing is third-party cookies. What Lester says is correct except that when you view a page, the browser sends requests to other locations to load their resources too. The requests are the same as regular HTTP requests and can therefore set and receive cookies and other data.
In some cases this mechanism can be used to share information between domains. Check your security settings as there is often a setting to disallow third party cookies.
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!