News for hackers. Stuff that matters.
Re:Server Sent Events by tehbeard on Tuesday May 16, 2023 @04:19AM (#35958974)
SharedWorker (the thing needed for a "singleton worker") only just made it into Safari the end of last year...

plus you now have to handle multiplexing and demultiplexing for different tabs on both server and client.

By the time that arrived and HTTP/2 had wide enough adoption, everyone's already used to building atop Websocket...

Also the EventSource in the browser is heavily gimped. GET only, No custom headers, and last I checked you can forget about configuring any CORS stuff for credential passing.

Re:Server Sent Events by cassepipe on Tuesday May 16, 2023 @05:46AM (#35959578)
Not sure if that's what you are asking but there's a `withCredentials` option (which IIRC is the only possible option)

I was looking at : https://stackoverflow.com/questions/61041389/managing-server...

Shared worker would actually allow for SSE in a service worker ! That's nice.