Hacker News new | ask | show | jobs
by shaka881 5239 days ago
It's not pushing, the browser still has to poll - it's just enqueueing files for transfer, right?

Even if that use case has some utility (of which I'm dubious), it still needlessly breaks the addressability semantics of URLs. It would be much better, in my opinion, to have the backend issue redirect to an unambiguous URL that refers to the static resource, then let the web server do the thing it's good at.

1 comments

It only uses polling if the browser doesn't support WebSockets, in which case socket.io would fall back to another method. Otherwise it is truly pushing.

From looking at the source, it looks like it encodes the file as a DataURL in base64 to send the files.