4 ms·
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 dem
by tehbeard 3y ago
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.
- cassepipe 3y agoNot 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-side-events-with-a-service-worker https://stackoverflow.com/questions/61041389/managing-server... Shared worker would actually allow for SSE in a service worker ! That's nice.