CGI App: Add cookie to another Domain

I want to add a cookie to appear at another domain.

Here is my code so far, not sure why it doesn't work, but the cookies don't appear at the new domain.

// Add cookie to current domain. THIS WORKS FINE!
with Response.Cookies.Add do begin
  Name := 'Product';
  Value := '1'
  Expires := Now + 1;
  Path := '/';

// Add the same cookie to another domain.
with Response.Cookies.Add do begin
  Name := 'Product';
  Value := '1'
  Expires := Now + 1;
  Path := '/path/';
  Domain := '';

Any help would be great. Thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't think that you can read or set cookies of another domain, if that is possible then you can read and set, hotmail cookies, then there will not be security in cookies.

I think Domain property mean the domain that you are registering, for example if you have two domain names for your web server such as and, you can set the cookies only for users who use to access your computer or vice versa.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cjclaytonAuthor Commented:
That was my guess too - once thinking about it a bit more!
Thanks for your help.

Do you know if should I allocated the points to you or delete my questions altogether?

You are putting Motaz in a awkward position with this last question, so I'll comment on it if you don't mind...
You should assign him the points, because he gave you the answer, regardless of the fact it was negative.

Also, if I may suggest, it would be wise of you to follow up on your opened questions - I looked at your question history and you have quite a bit of them.
Not following up on your questions after receiving several possible answers is a good way to have experts ignoring you on your next question. Please understand - taking time for commenting or even answering ones question, and then not receiving any response is very iritating.
Please try to avoid this pattern of behaviour, thanks.
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
Lukasz LachCommented:
No comment has been added lately (18 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to Motaz http:#7134600

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --


EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.