Two browser windows (acting as socket clients) communicate their:<p>- Screen dimensions - (screen.width, screen.height)<p>- Window dimensions - (window.innerWidth, window.innerHeight)<p>- Window X/Y position - (window.screenX, window.screenY)<p>...or whichever calculation works best for you.<p>The original work by Bjorn Staal <a href="https://twitter.com/_nonfigurativ_/status/172732259457002734" rel="nofollow noreferrer">https://twitter.com/_nonfigurativ_/status/172732259457002734</a> used localStorage, but I found sockets more fun, because if tweaked a bit, this can be shared with friends.<p>Here's a demo of how it works and the codebase: <a href="https://github.com/Momciloo/fun-with-sockets/">https://github.com/Momciloo/fun-with-sockets/</a>