Cookies and subdomains

asp.net, cookies

Solution

Yes, you can. Use:

Response.Cookies("UID").Domain = ".myserver.com"

Problem

Can a cookie be shared between two sites on the same top level domain? Say `www.example.com` and `secure.example.com` ? We are looking into implementing a cache for non-secure content, and need to segregate secure content to another domain. What parameters does the cookie need? I'm using asp.net

Original source

Related problems