Re:Server-Sent Events: an alternative to WebSockets
by chrismorgan on Sunday February 13, 2022 @08:17AM
(#30321561)
It is, however, interesting to note that Fastmail’s webmail doesn’t use EventSource, but instead implements it atop fetch or XMLHttpRequest. An implementation atop XMLHttpRequest was required in the past because IE lacked EventSource, but had that been the only reason, it’d just have been done polyfill style; but it’s not. My foggy recollection from 4–5 years ago (in casual discussion while I worked for Fastmail) is that it had to do with getting (better?) control over timeout/disconnect/reconnect, probably handling Last-Event-ID, plus maybe skipping browser bugs in some older (now positively ancient and definitely unsupported) browsers. The source for that stuff is the three *EventSource.js files in https://github.com/fastmail/overture/tree/master/source/io.
Re:Server-Sent Events: an alternative to WebSockets
by ok_dad on Saturday February 12, 2022 @02:04PM
(#30315314)
> the only thing I don't like about them is that Firefox dev tools make them totally impossible to debug
You can't say that and not say more about it, haha. Please expand on this?
Also, I'm a Fastmail customer and appreciate the nimble UI, thanks!
Re:Server-Sent Events: an alternative to WebSockets
by coder543 on Saturday February 12, 2022 @02:53PM
(#30315725)
I think their information could be outdated. Since Firefox 82, you can supposedly inspect the content of SSE streams: https://developer.mozilla.org/en-US/docs/Tools/Network_Monit...
Before that... yeah, the Firefox dev tools were not very helpful for SSE.
Re:Server-Sent Events: an alternative to WebSockets
by mmcclimon on Saturday February 12, 2022 @03:47PM
(#30316261)
Hmm! You're right that I hadn't looked it a while, so I checked before making the comment above. I'm still seeing the same thing I always have, which is "No response data available for this request". Possibly something is slightly wrong somewhere (though Chrome dev tools seem fine on the same), but you've given me something to look into, thanks!
Re:Server-Sent Events: an alternative to WebSockets
by coder543 on Saturday February 12, 2022 @03:56PM
(#30316352)
That is interesting. I just tested it myself, and at least for my setup (Firefox on Mac on ARM), the events only showed up in the dev tools if the server closed the SSE connection... so, maybe Firefox still hasn't fully fixed this problem.
Re:Server-Sent Events: an alternative to WebSockets
by mmcclimon on Saturday February 12, 2022 @04:57PM
(#30316939)
Yeah, that seems to be the case (confirmed with their little example at https://github.com/mdn/dom-examples/tree/master/server-sent-...). Once the connection is closed you can see things, but that's not particularly useful for debugging!
Re:Server-Sent Events: an alternative to WebSockets
by noisy_boy on Saturday February 12, 2022 @08:22PM
(#30318174)
Funny because I love fastmail but literally the only complaint I have is their android app takes too long to load
Re:Server-Sent Events: an alternative to WebSockets
by dnr on Saturday February 12, 2022 @04:58PM
(#30316947)
The Fastmail UI is indeed snappy, except when it suddenly decides it has to reload the page, which seems to be multiple times a day these days (and always when I need to search for a specific email). Can you make it do what one of my other favorite apps does: when there's a new version available, make a small pop up with a reload button, but don't force a reload (until maybe weeks later)?
1. https://jmap.io/spec-core.html#event-source