text/*
text/event-stream
The MIME type for Server-Sent Events (SSE) streams.
What is text/event-stream?
text/event-stream is the required Content-Type for Server-Sent Events endpoints consumed by EventSource in the browser. Each event is a chunk of text separated by blank lines.
Typical usage
Streaming updates from server to client — notifications, live tickers, LLM streaming.
Common gotchas
SSE responses must not be gzipped by intermediaries or the stream will buffer. Also disable proxy buffering (X-Accel-Buffering: no on nginx).
HTTP header example
Response header
Content-Type: text/event-stream; charset=utf-8Reference
HTML Living Standard — Server-Sent Events
Frequently asked questions
What is the text/event-stream MIME type?
text/event-stream is the required Content-Type for Server-Sent Events endpoints consumed by EventSource in the browser. Each event is a chunk of text separated by blank lines.
What file extension does text/event-stream use?
text/event-stream has no single canonical file extension — it is used as a transfer / content type rather than being tied to a specific file name suffix.
How do I set the Content-Type for text/event-stream?
Send the HTTP response header Content-Type: text/event-stream; charset=utf-8. Streaming updates from server to client — notifications, live tickers, LLM streaming.
Is text/event-stream an official MIME type?
Yes. text/event-stream is officially registered with IANA (HTML Living Standard — Server-Sent Events), so standards-conformant clients recognize it.
What are common mistakes with text/event-stream?
SSE responses must not be gzipped by intermediaries or the stream will buffer. Also disable proxy buffering (X-Accel-Buffering: no on nginx).