SSE test page

Duplicate your tab to test. The browser console will log an event when each connection is made and the below text will update.

There is 0 connection(s).

If you've landed here, I just want to list some caveats about Server sent events.

  • You're going to have trouble if there are lots of intermediate services in your network setup. In fact, some networking setups might cause so much trouble for SSE that I'd recommend not using them unless you have extreme confidence about the environment you are deploying to. Troubleshooting the issues will be quite the trail of tears.
    Source (Not my story but very similar.)
  • If you're not serving over at least http/2, you cannot serve more than 6 connections per client.
    Source (http/2 defaults to 100 connections.)
  • This page is served on deno deploy and is http/2. You can read about the support of many web streaming technologies here.
  • To anyone reading, SSE works here in most cases. OSX clients however seems to lag when closing connections.
  • At time of writing, inspecting Server sent events in the networking tab of firefox is busted.
    Source

As an experiment is also basic chat functionality, click the link to see.