1

I have an IFrame which contains the cookies, I want to read these cookies in the parent window. I read from few stackoverflows that we can make use of the 'postMessage' but it works as an 'event listener'. Could somebody explain how to read the cookies from iframe in the parent window.

Accessing cookies of an iFrame in parent window

Please let us know any other possible way, Or How it is possible using event listener post message?

Thanks, Harry

Harry
  • 3,072
  • 6
  • 43
  • 100
  • Possible duplicate of [Accessing cookies of an iFrame in parent window](https://stackoverflow.com/questions/30067870/accessing-cookies-of-an-iframe-in-parent-window) – Louys Patrice Bessette May 26 '17 at 07:42
  • No its not duplicate, I asked for any other solution other than event listener. @LouysPatriceBessette – Harry May 26 '17 at 07:49
  • I think a `cookie` must be read from a page which is on the same path as where is was defined to be. So if you have differents paths on the parent and on the iframe, that's the way. If you have the same path, read it directly from the parent. – Louys Patrice Bessette May 26 '17 at 07:59
  • It is possible using postMessage and few technique, I didn't find much blogs for this. Can u remove the possible duplicates – Harry May 26 '17 at 08:11

0 Answers0