It's possible to share a cookie between 'some' subdomains?

cookies, http

Solution

Your assumptions are correct :-)

Problem

I've been reading some posts about web performance, one of the points is to serve static content from a cookie-free domain, my question is: Can I share cookies between, let's say example.com and www.example.com, while excluding static1.example.com, static2.example.com, etc? Or do I need to set a different top level domain? I know (or I think) that I could set the domain of the cookie to '.example.com', but correct me if I'm wrong this shares the cookies across all sub-domains.

Original source