We help IT Professionals succeed at work.

Domain problem.

Manish
Manish asked
on
287 Views
Last Modified: 2010-03-31
Hi experts,
  I'm trying to acsess a cookie created for domain ".xyz" in another domain ".abc". Is it possible. If yes or if no can you provide any location/url where I can get complete information about this issue.

Also I want the specification for identifing a valid domain name,
like is ".abc" a valid domain name only ,"com", ".edu" etc. are the only valid domain names. It would be great if you can provide any link or url where I can get the complete information.

Karan
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2004
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
ManishLead
CERTIFIED EXPERT

Author

Commented:
What about valid domain name q?
Mayank SPrincipal Technologist
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Top Expert 2004

Commented:
http://www.shauninman.com/plete/2006/05/validating-domain-names

Someone there also brings up the very valid point that this will block IP addresses, which may not be satisfactory :-(

Tim
CERTIFIED EXPERT
Top Expert 2004

Commented:
...bah ;-)
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
He he.... no problemo (like Arnold in Terminator 2)
ManishLead
CERTIFIED EXPERT

Author

Commented:
Is Cookie formed by
     http://abc.us.xyz website accessible to
     http://mno.ca.xyz ?
If yes , how?
If no,  then what to do?

In above URL what is domain? is it .us.xyz or .xyz?
What makes valid domain extention?
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
No, it should not be accessible.

For domain extension, I don't think there are any rules other than what I posted above.
CERTIFIED EXPERT
Top Expert 2004

Commented:
>> If no,  then what to do?

What are you trying to do?  Share data between websites?
ManishLead
CERTIFIED EXPERT

Author

Commented:
>>What are you trying to do?  Share data between websites?
Yes, cookie data.
CERTIFIED EXPERT
Top Expert 2004

Commented:
So you're trying to read cookie data from someone elses website?

You can't :-(

If both websites belong to you, then you may be able to do some sort of message passing between them to tie users together and share user data that way, but you can't just read cookies written by other sites...

It would be a huge security hole if you could...

Tim
ManishLead
CERTIFIED EXPERT

Author

Commented:
Ya Tim,
  Your second point is correct ,
What kind of message do I need to pass ?
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
It could be through a web-service or simply an HTTP post that you can send to a web-site:

http://www.javaalmanac.com/egs/java.net/Post.html 
CERTIFIED EXPERT
Top Expert 2004

Commented:
If you have a single user database, then it will become easier, as user id credentials will be the same on both sites...
ManishLead
CERTIFIED EXPERT

Author

Commented:
Didnt get your point?
CERTIFIED EXPERT
Top Expert 2004

Commented:
Can you explain properly what data it is you're trying to share?

We're shooting in the dark with suggestions otherwise
ManishLead
CERTIFIED EXPERT

Author

Commented:
My application is accessible through more than one domain. Domains are region specific, region most of the time are locale. Earlier my application was creating cookies which were accessible by that domain only eg ".ab.pqrs". Now I want the cookies generated in ".ab.pqrs" to be accessible by another domain ".ed.pqrs". From the above discussion it is clear that one cookie of one domain is not accessible by another domain. But my requirements are such that I want alternative for it.
Cookie basically contains information related to user preferences for the user who logged in like country, locale, few numbers used by application, etc.
I want to know how can I do this?
CERTIFIED EXPERT
Top Expert 2004

Commented:
why not store these preferences in a database shared between the webapps?

Then when a user logs in, the cookie can just store their session id, and their preferences can be loaded from the database, no matter which site they log in to...

Tim
ManishLead
CERTIFIED EXPERT

Author

Commented:
In my case I can't store in Database. It should be handled throughs cookies only.
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
It should be handled as request parameters then, I guess.
CERTIFIED EXPERT
Top Expert 2004

Commented:
>> It should be handled throughs cookies only.

The problem is, it can't be

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.