I tested all the cases in the latest Chrome, Firefox, Safari in 2019.
Response to Added:
- Will a cookie for .example.com be available for www.example.com? YES
- Will a cookie for .example.com be available for example.com? YES
- Will a cookie for example.com be available for www.example.com? NO, Domain without wildcard only matches itself.
- Will a cookie for example.com be available for anotherexample.com? NO
- Will www.example.com be able to set cookie for example.com? NO, it will be able to set cookie for '.example.com', but not 'example.com'.
- Will www.example.com be able to set cookie for www2.example.com? NO. But it can set cookie for .example.com, which www2.example.com can access.
- Will www.example.com be able to set cookie for .com? NO