2

I have a cross domain url in which if I access directly, I can see cookies(from Resources->Cookies in chrome browser).

I have created a separate HTML file in which whenever the HTML file page loads, I need to get the cookie from that url.

Is it possible through javascript?

UI_Dev
  • 3,317
  • 16
  • 46
  • 92
  • I doubt it - it defeats the object of sandboxing and "domain" security. Resources >Cookies works because you the user on that machine and access is assumed - for want of a better word. – Anthony Horne Jul 20 '16 at 12:24
  • Check this http://stackoverflow.com/questions/3342140/cross-domain-cookies – Sree KS Jul 20 '16 at 12:25

1 Answers1

5

You can not read the cookies from cross domain url, unless the website has explicitly allowed it. (that is very rare)

Generally You can not do it.

Ashkan Mobayen Khiabani
  • 33,575
  • 33
  • 102
  • 171