Solved

CGI App: Add cookie to another Domain

Posted on 2002-07-06
5
200 Views
Last Modified: 2010-04-04
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 := '/';
end;

// THE FOLLOWING CODE DOESN'T WORK: WHY?????
// Add the same cookie to another domain.
with Response.Cookies.Add do begin
  Name := 'Product';
  Value := '1'
  Expires := Now + 1;
  Path := '/path/';
  Domain := 'www.anotherdomain.com';
end;

Any help would be great. Thanks
0
Comment
Question by:cjclayton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 7

Accepted Solution

by:
Motaz earned 50 total points
ID: 7134600
I don't think that you can read or set cookies of another domain, if that is possible then you can read and set www.yahoo.com, 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 domain1.com and domain2.com, you can set the cookies only for users who use domain1.com to access your computer or vice versa.

Motaz
0
 

Author Comment

by:cjclayton
ID: 7134610
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?
0
 
LVL 7

Expert Comment

by:Cynna
ID: 7134908
cjclayton,

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.
0
 

Expert Comment

by:CleanupPing
ID: 9343097
cjclayton:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 9460253
cjclayton,
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 ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question