allenskd
allenskd

Reputation: 1805

setting cookie with domain

This is pretty much a basic question since I got a bit confused

When we set a cookie with domain .mydomain.com refers to use the same cookie over subdomains, what if I do .test.mydomain.com does it mean urls like helloworld.test.mydomain.com will be able to re-use the cookie?

Upvotes: 1

Views: 234

Answers (2)

Linora
Linora

Reputation: 10988

Here is an intersting article about sharing cookies across subdomains

15Seconds

Upvotes: 0

Dan Grossman
Dan Grossman

Reputation: 52372

Yes, that's how it works. There's no special detection of what level the 'subdomains' are, everything is really a subdomain to the TLD at the least. What if you had a .co.uk address?

Upvotes: 1

Related Questions