The HTML5 postMesssage API allows sending message between window opener and openee. However, it requires reference/linkage to the receiver window.
Is there a pure client side JavaScript way to broadcast events to all window subscriber, under same doaminname, opened by user (e.g. Duplicate Tab) same session, without help of server?
For now, I come up with few ideas
- Server side channel (by $_SESSION) and polling
- JS Cooking update and polling (hard cookie play)
- localstorage update and polling (even worst)
- WebRTC? (poor browser support)
Is there a API I missed?
BTW, No cross-domain is need. I am thinking of same domain, multiple open by user.