fun-with-sockets

Creative

interactive browser demo

SHOW HN2023

Legend

fun-with-sockets

I saw this mind-blowing experiment, so I made a simple version of it

github.com

#browser windows#websockets#window position#multi-window#javascript

403points
129comments
#77of 3,109 in 2023
Top 3%of 2023 by points

How HN took it

CuriousMostly questions and neutral comments

10 positive, 28 neutral or asking, 0 mixed, 17 critical, out of 55 comments about the project. Thread score 0.00.

Privacy: 1 for, 10 againstIdea: 5 for, 4 againstExecution: 1 for, 3 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Cool demo and fun creative use of browser APIs

    From 3 comments
    • I love the concept and the demo! Amazing creative work
      awei on HN
    • Really great. The web is really going forward
      p-nerd on HN
    • Wow this seems profound, I didn’t even know you could do that, that could be the future of augmented reality if you think about it, layers! Great job!
      bionhoward on HN
  • Simple code with almost no dependencies

    From 1 comment
    • Love how simple the code is, with almost no external dependencies
      bdcravens on HN

Objections

  • Exposing window and screen position to websites is a privacy and fingerprinting risk

    From 4 comments
    • None of these screen properties should be available to websites.
      account42 on HN
    • Am I the only one that's horrified that window.screenX and window.screenY exist? This is not information that I want to provide.
      munch117 on HN
    • W-why is window LOCATION exposed to websites? Apparently even in FF private browsing... At first I thought this is an electron only thing. I get it that we gave up on…
      no_time on HN
    • Sorry, i'm a little lost. I tried thinking about it, but I can't think of any nefarious attacks someone could do with screenX/Y. Why is that such a risk? What could they possibly…
      zer0kool on HN
  • Laggy updates over the network

    From 2 comments
    • But… why does it lag? Shouldn’t this be trivial enough to be instant?
      Filligree on HN
    • Probably because of websocket network lag and also, in my anecdotal experience, window position updates are sometimes strangely jittery
      taberiand on HN

Requests

  • Support for multiple monitors

    From 1 comment
    • That's a great demo! I'd be curious to see how this would work with multiple monitors. Also, thank you for voluntarily acknowledging that you were directly inspired by somebody…
      vunderba on HN
  • Use BroadcastChannel or postMessage instead of a socket for local communication

    From 3 comments
    • Use BroadcastChannel; you don't need no sockets https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API
      rtcode_io on HN
    • You can use a BroadcastChannel to send messages between the Windows directly. This should reduce latency when working locally.
      nikeee on HN
    • I wonder if it would be more instant if they used postMessage api instead of going over network.
      bawolff on HN

Questions

  • Does it work on Wayland

    From 1 comment
  • What is the practical application

    From 1 comment
    • I'm wondering about practical application of this demo...
      butz on HN

Alternatives named

  • Bjorn Staal's original localStorage multi-window demo

    From 2 comments
    • > The original work by Bjorn Staal https://twitter.com/_nonfigurativ_/status/172732259457002734 used localStorage, but I found sockets more fun, because if tweaked a bit, this…
      heavyset_go on HN
    • Might as well link to the original / "stolen from" author's equivalent demo with Three.js - https://bgstaal.github.io/multipleWindow3dScene/ - and repo -…
      sprobertson on HN
  • Browser Ball by Google Chrome Experiments

    From 2 comments
    • Browser Ball maybe? https://experiments.withgoogle.com/browser-ball
      unfunco on HN
    • This and the original reminded me of this really old Chrome Experiments demo, and some others like it: https://experiments.withgoogle.com/browser-ball
      Zacru on HN
  • WindowKill video game

    From 1 comment
    • If you like this, you might also enjoy WindowKill, a video game similar to Asteroids that cleverly uses windows that can overlap and interact with each other. You need to shoot…
      Simran-B on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/38413660)