Testing

EventSource: Browser Support, Features, Limitations

EventSource works in Chrome 6+, Edge 79+, Firefox 6+, Safari 5+ on macOS, Safari 4+ on iOS, Opera 11+, and Samsung Internet 4+. Learn the API, features, and limits.

Author

Prince Dewani

May 6, 2026

EventSource is the JavaScript interface defined in the WHATWG HTML Living Standard that opens a one-way text stream from a server to a browser over plain HTTP using the text/event-stream MIME type. It works in Chrome 6+, Edge 79+, Firefox 6+, Safari 5+ on macOS, Safari 4+ on iOS, Opera 11+, Samsung Internet 4+, and Android Browser 4.4+, while Internet Explorer and Opera Mini never added support.

This guide covers what EventSource is, the browsers that support it, the key features, how it compares to WebSockets, the limitations, and how to check support in your browser.

What is EventSource?

EventSource is a JavaScript interface defined by the WHATWG HTML Living Standard that opens a long-lived HTTP connection to a server and receives a one-way stream of UTF-8 text events. The browser parses the text/event-stream response, fires message events on the page, and reconnects automatically on network drops.

Which browsers does EventSource support?

EventSource ships in every modern browser, with global support near 97% across desktop and mobile. Once a browser shipped the interface, the spec did not break across versions, so feature detection is the only check production code needs.

Loading browser compatibility data...

EventSource compatibility in Chrome

Chrome supports EventSource from Chrome 6 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 4 and 5 did not support EventSource. The constructor, message and error events, the withCredentials option, and automatic reconnection all ship by default in every supported Chrome release, and Chrome for Android tracks the same Chromium implementation as the desktop build.

EventSource compatibility in Edge

Microsoft Edge supports EventSource from Edge 79 on Windows, macOS, and Linux. Pre-Chromium EdgeHTML versions 12 to 18 did not ship the EventSource interface, which means anyone testing on the legacy Edge engine still needs a polyfill. Chromium-based Edge 79 and later track the upstream Chromium build, so behavior matches Chrome on every supported Edge release.

EventSource compatibility in Firefox

Firefox supports EventSource from Firefox 6 on Windows, macOS, Linux, and Android. Firefox 1 to 5 did not support EventSource. Mozilla ships the constructor, the readyState property, named events through addEventListener, and the withCredentials option on every supported Firefox release, and Firefox for Android tracks the same Gecko build as the desktop browser.

EventSource compatibility in Safari

Safari supports EventSource from Safari 5 on macOS and from Safari 4 on iOS and iPadOS. Safari 3 and earlier did not support EventSource on either platform. Apple ships the constructor, the message and error events, and automatic reconnection on every supported Safari version, and Safari Technical Preview tracks the same WebKit implementation that ships in stable Safari.

EventSource compatibility in Opera

Opera supports EventSource from Opera 11 on Windows, macOS, and Linux. Opera 9 to 10.6 carried only partial support during the early Server-Sent Events draft. Opera Mobile 12+ and Opera for Android both ship the interface on phones and tablets, while Opera Mini does not expose EventSource in any version because the proxy-based rendering pipeline does not keep long-lived HTTP connections open per user.

EventSource compatibility in Samsung Internet

Samsung Internet supports EventSource from Samsung Internet 4 on Galaxy phones and tablets. The browser tracks the upstream Chromium implementation, so any Samsung Internet release on a current Android device ships the constructor, automatic reconnection, and the withCredentials option by default. Samsung Internet 1 to 3 did not support EventSource.

EventSource compatibility in Android Browser

Chrome for Android supports EventSource from version 4.4 onward, which covers every Android device sold in the last decade. The legacy stock Android Browser based on WebView 3.x and earlier did not support EventSource. Firefox for Android also ships EventSource from Firefox 6 on phones and tablets, so the streaming interface is available on every actively supported Android browser.

EventSource compatibility in Internet Explorer

Internet Explorer 5.5 through 11 do not support EventSource on any version of Windows. Microsoft has retired Internet Explorer 11, so any project still pinned to IE has to load a polyfill like the eventsource npm package or fall back to long polling. Move new EventSource workloads to Chromium-based Edge for full native support.

Note

Note: EventSource behaves differently across browsers, proxies, and HTTP versions. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of EventSource?

EventSource bakes streaming, reconnection, and event routing into a single small interface so the page does not have to wire any of it by hand. The features below cover what the constructor gives you out of the box.

  • One-line streaming connection: The constructor new EventSource(url) opens a persistent HTTP connection and starts parsing the text/event-stream response without any extra setup. The page only needs to attach a message listener to start receiving server-pushed data.
  • Automatic reconnection with Last-Event-ID: The browser reconnects on network drops with a default 3000-millisecond interval. On reconnect, the browser sends the Last-Event-ID header so the server can resume the stream from the last delivered event without losing or duplicating messages.
  • Named events through addEventListener: The server can label each event with an event: field, and the page routes those labels with stream.addEventListener("price", handler) instead of switching on a payload field. Unlabeled events fire on the default message channel.
  • readyState lifecycle and close(): The interface exposes CONNECTING (0), OPEN (1), and CLOSED (2) constants on the readyState property, plus a close() method that tears down the connection without firing another reconnect.
  • withCredentials for cross-origin auth: Passing { withCredentials: true } to the constructor sends cookies and HTTP authentication headers on cross-origin streams, mirroring the same flag from the Fetch and XHR APIs for CORS-aware servers.
  • Server-controlled retry interval: A retry: 10000 line in the event stream tells the browser to wait 10 seconds before the next reconnect, which lets the server back off clients during peak load without any client code change.

EventSource vs WebSockets: what is the difference?

EventSource and WebSockets both keep a long-lived connection open between a browser and a server, but the trade-offs cluster around direction, transport, and payload type. The table below compares the two on the dimensions that drive the design decision.

DimensionEventSource (SSE)WebSockets
DirectionOne-way: server pushes to client onlyBidirectional: either side can send a frame at any time
TransportPlain HTTP, rides HTTP/2 multiplexing for freeDedicated TCP connection, HTTP/2 needs RFC 8441
PayloadUTF-8 text only, parsed as text/event-streamUTF-8 text or binary frames, no built-in parsing
ReconnectionAutomatic, with Last-Event-ID resumeManual, the page must implement backoff and replay
Browser supportChrome 6+, Firefox 6+, Safari 5+, Edge 79+, no Internet ExplorerChrome 16+, Firefox 11+, Safari 7+, Edge 12+, IE 10+
Best fitLive feeds, AI streaming responses, dashboards, notificationsChat, multiplayer games, collaborative editors, trading
...

What are the limitations of EventSource?

EventSource trades flexibility for a tiny API, so the rough edges show up the moment a project needs anything beyond a one-way GET stream. The painful failures cluster around HTTP method, headers, connection caps, and proxy behavior.

  • GET only, no request body: The constructor only issues a GET request, so any state has to ride in the URL query string. Long auth tokens or large filter payloads either bloat the URL or force a polyfill like fetch-event-source that opens an SSE-style stream over a POST.
  • No custom headers: The native API only accepts the withCredentials option, so Authorization, X-Tenant, or X-API-Key headers cannot be set. Same-origin endpoints can lean on cookies, but cross-origin streams usually need a reverse proxy that injects the headers server-side.
  • Six-connection cap on HTTP/1.1: The browser caps open connections per origin at six over plain HTTP/1.1, so the seventh EventSource opened against the same origin queues until another closes. HTTP/2 lifts the cap to the negotiated SETTINGS_MAX_CONCURRENT_STREAMS value.
  • UTF-8 text only: The wire format is text/event-stream, so binary payloads have to be base64-encoded on the server and decoded in the page. WebSockets carry binary frames natively when the workload needs it.
  • Proxies buffer streaming responses: Many corporate forward proxies, NGINX defaults, and CDN edges buffer responses until the body finishes, which collapses an SSE stream into one giant payload at disconnect. Set X-Accel-Buffering: no on the response and disable any compression filter on the path.
  • No native progress or backpressure: The page cannot signal slow consumers, so a client that falls behind keeps receiving events into the browser buffer until memory pressure forces a reconnect. Servers usually rate-limit or paginate by sequence ID instead.
  • Internet Explorer and Opera Mini are out: Both browsers never shipped EventSource, so any audience that still includes them needs the eventsource npm polyfill or a long-polling fallback wired into the same code path.

In my experience, the limitation that bites teams hardest is proxy buffering. An SSE feed that streams cleanly on localhost goes silent in staging because NGINX or a CDN edge holds the response until the connection closes. Set X-Accel-Buffering: no, disable gzip on the route, and verify a chunked response with curl before you ship.

...

How do you check if a browser supports EventSource?

A one-line feature check on the window object tells the page whether to wire native EventSource or load a polyfill. Paste this snippet into the DevTools console of Chrome, Edge, Firefox, or Safari to confirm support and watch a single event arrive from a public test stream.

// Paste this into the DevTools console to confirm EventSource support and watch a test stream.
if ("EventSource" in window) {
  console.log("EventSource is supported in this browser.");

  const stream = new EventSource("https://sse.dev/test");

  stream.addEventListener("open", () => {
    console.log("Stream opened, readyState =", stream.readyState);
  });

  stream.addEventListener("message", (event) => {
    console.log("Event received:", event.data);
    stream.close();
    console.log("Stream closed after first event.");
  });

  stream.addEventListener("error", () => {
    console.log("EventSource error: the test endpoint may be unreachable from this network.");
  });
} else {
  console.log("EventSource is not supported in this browser.");
}

If the console logs that EventSource is supported but the open event never fires, the network path is blocking long-lived HTTP responses. Check the Network tab for a 200 response with Content-Type: text/event-stream, then verify no proxy on the path is buffering or compressing the body.

Citations

All EventSource version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests