Skip to main content
Participant
September 28, 2006
Question

cfcookie and subdomains

  • September 28, 2006
  • 1 reply
  • 479 views
How can I limit a cookies use to a specified subdomain using the domain attribute within the cfcookie tag?

I couldn't get this to work: <cfcookie name="foo" domain=".foo.mydomain.com">
foo.mydomain.com is the dummy subdomain

FYI, using CF6.1

LiveDocs are confusing at best.

Thanks for your help.
This topic has been closed for replies.

1 reply

September 28, 2006

<cfcookie name="foo" domain=".foo.mydomain.com" value="foocookie">
<cfcookie name="foo" domain=".foo2.mydomain.com" value="foo2cookie">

I just tried it and it's working correctly.

Perhaps your test was invalid? Can you explain in great detail how you
performed your test?


Good luck!