3rd Party Social Cookies on Site

119 Views Asked by At

I am creating a site for a friend, and the main page has a Google +1 button, a Twitter Follow button, and a Facebook Like button.
When I look under Cookies in Google Chrome's F12 menu, the list on the left has an assortment of Google, Twitter, and Facebook sites, as well as my own (currently localhost)
When I look under localhost's cookies, there are 15, and all of them list their domain as either .twitter.com or .google.com
When I deleted all cookies listed under localhost, I found myself logged out of my Google, Twitter, and Facebook account, even though I didn't delete any Facebook cookies! Why can I see their cookies under the localhost list, and is there a way to prevent this from happening? It'll be a bit annoying to distinguish my cookies from theirs. Thank you!

1

There are 1 best solutions below

0
On

Cookies are domain specific and cannot be read by sites of other domains. My guess is that the delete went beyond just the localhost scope. I would try using the cookie manager from within the Chrome settings rather than through the Developer Tools console:

  1. Open the Settings
  2. Click Show advanced settings...
  3. In the Privacy section, click Content Settings. The Content Settings window opens.
  4. In the Cookies section, click All cookies and site data. The Cookies and Site data window opens.
  5. Filter the display for localhost
  6. Click the localhost entry to display the cookies for this domain.
  7. Click an individual cookie to delete it or click the X on the right side to remove all cookies for this domain.

From within here, you can examine other cookies for other domains and test your script to try to retrieve those. You won't be able to unless you've uncovered a serious browser bug, which is unlikely.