1

Is there any way to send a message between windows which were created independently of each other? That is, the user opened Window A somehow and then Window B somehow and now I would like to send a message from A -> B. The postMessage interface only works if I have a handle to the other window, which I do not. Both windows are on the same domain and I would know the exact URL of the other window.

Note that I'm not looking for a solution which involves one window polling a value. I can already do that with localStorage and am looking for an alternative.

edA-qa mort-ora-y
  • 26,115
  • 34
  • 118
  • 238
  • 2
    It's an interesting question, which explains why it's not the first time it's asked. See [this for example](http://stackoverflow.com/questions/2236828/javascript-make-tabs-windows-with-same-origin-communicate?rq=1). I don't think there is a cross-browser solution today. – Denys Séguret Mar 11 '13 at 15:13
  • 2
    I cannot imagine any other way than polling using cookies/localstorage. Browser extension perhaps? – mplungjan Mar 11 '13 at 15:14
  • 1
    The problem is that not everybody would agree on this being safe, even with a same origin policy, so I'm not sure you can expect this possibility in near future. – Denys Séguret Mar 11 '13 at 15:15
  • 2
    I'm pretty sure it's impossible without polling. – PitaJ Mar 11 '13 at 15:23
  • also http://stackoverflow.com/questions/7905887/javascript-find-browser-windows-open-with-the-same-domain – ericosg Mar 11 '13 at 15:37

0 Answers0