This is maybe a really stupid question.
When setting cookies, and if third party cookies are disabled, then example.com and example2.com are considered different. However, site1.example.com and site2.example.com are not considered third party as they are both part of .example.com.
However, when you have a Second Level Domain like “.co” in .co.uk how does the browser know that example.co.uk and example2.co.uk are third party, and not just subdomains of .co.uk? (the .co being equivalent to .example above)
Does the browser just contain a hard coded list?
After some additional research, it appears browsers use their own list of effective TLDs.
For example, Mozilla make the following available for themselves and others
http://publicsuffix.org/list/