I'm opening a window as
winRef = window.open(......);
Then I'm storing the above winRef
in cookie so that I can get the reference to child window even if the parent refreshes.
That didn't work because when I tried to save winRef in cookie it just saves the text representation/string
of the object so you only have "[object Window]"
as string, it's not an object.
Is there any way to store the window reference as a cookie? If it's not possible then what are some other possible methods which I can use?
PS: I think storing just the window name instead of window object in the cookie can solve the issue but it can't be done in my case, I can't provide window names, basically the window is an online editor, if I give a particular name to it then user can't open multiple online editors as it will always reload the currently opened window.
Ultimate goal: Retrieving references to child window if the parent refreshes