I've found that recently when I visit YouTube, I am automatically logged in with my Google/Gmail Account. I don't like this at all. I do not want my video browsing history tied up with my Google account.

This question came from our site for computer enthusiasts and power users.

edit: I am aware Google and YouTube are owned by the same parent company. My question is about how they are able to share information across domains and how I can block this in Firefox.
–
user13137Dec 10 '11 at 20:49

I moved my comment to an answer, because, well, it's an answer. :) I don't think you can choose to block how people who wrote those cookie use them, aside from deleting them. But maybe other's have some ideas.
–
techie007Dec 10 '11 at 20:52

i know i don't have control over how cookies are used by the site who wrote them. what i don't understand is how another domain can read them. especially when third-party cookies are disabled explicitly in my settings.
–
user13137Dec 10 '11 at 20:55

See Manoel's answer below. I just tested it and it works.
–
AlexJan 28 '12 at 21:07

I havn't checked the method (and it currently doesn't happen for me, btw. - I'm logged in on GMail, but logged out on YouTube). But third-party cookies aren't necessarily what is happening here. There are other ways, similar to the way OpenID authentication works, or the way Wikipedia (probably) logs you into all of Wikimedia.

Say youtube.com embeds an image google.com/authenticate?id=uniqueid&domain=youtube.com, then gets a Google-internal callback with your Google identity, to log you in.
Or the other way round: when you log into Google, they load an image from YouTube - say youtube.com/authenticate?id=uniqueid&source=google.com, then do an internal callback with the unqiue session ID to retrieve your authentication data and set another regular cookie on the youtube.com domain.

I don't think you will be able to block this easily, not unless installing a proxy filter that e.g. disables all cookies from youtube.com; using "incognito" mode, or essentially rejecting all cookies from youtube.com in the browser (blacklist).

This is correct. No cookies are used. The two sites are under common administration and share information with each other through a "back door" that doesn't involve your browser.
–
David SchwartzDec 11 '11 at 0:28

I guess that the easiest solution (but also the worse if you have some content on your YouTube account) is to create another YouTube account linked to a new Google profile that you use only for YouTube. If you look on the Google forums & FAQs, this is the "official" "recommanded" solution to dissociate accounts.

Then you'll be able to be logged on Gmail without being logged on YouTube.
This is not an acceptable solution, I know, so you may have to use some tricks to achieve that.

Go into the YouTube's account management (Your User -> Settings -> Manage Account) and look for the option that says Sign out of all YouTube Sessions. Click on the Sign Out Everywhere link. It will shutdown your YouTube session without logging you out from Gmail.