Web APIs

Server-Sent Events API

Checking compatibility...

Receive real-time updates from a server through a persistent connection. Perfect for live feeds, notifications, and real-time dashboards.

Basic Event Stream

Set up a live connection to receive continuous updates from a server. This example shows how to establish a persistent connection that stays open, allowing the server to send new information to your app whenever it becomes available.

=
=
=
=
=
=

Output

Click Run to see output...

Event Types

Handle different kinds of real-time updates from your server. This example demonstrates how to listen for specific event types, allowing your app to process various categories of updates differently - like separating news alerts from weather updates.

=
=
=
=
=
=

Output

Click Run to see output...