tags:

views:

24

answers:

1

Possible Duplicate:
how to setCookie and getCookie using domain name

when i getcookie using javascript, that will get for the current URL.

i want to getCookie by passing domain name, how to get it?

A: 

You mean, you want to query cookies set for a different domain? That can't be done for security reasons.

Imagine the implications: Any site could fetch the user's session cookies for their online banking site, or almost any other site they are logged into.

Pekka
@saran: are you sure "domain" is the right word? Those two sample links are on the same domain, so yes it would be possible.
Crescent Fresh
can you please send some code to save and retrieve cookies by giving URL names for my problem?
saran