TextText-based

text/event-stream

Server-Sent Events

Reference for text/event-stream, the MIME type for Server-Sent Events enabling real-time server-to-client streaming.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

HTTP Content-Type Header

HTTP Header
Content-Type: text/event-stream; charset=utf-8

Quick Facts

MIME Typetext/event-stream
CategoryText
TypeText-based (human-readable)

Common Usage

Server-Sent Events (SSE) provide a simple HTTP-based protocol for servers to push events to clients. Used for live notifications, real-time dashboards, stock tickers, social media feeds, AI chat streaming responses, and any scenario requiring server-to-client push without WebSocket complexity.

Code Examples

HTML
<!-- Set MIME type in meta or fetch headers -->
<meta http-equiv="Content-Type" content="text/event-stream">
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('text/event-stream');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'text/event-stream' });
nginx
# nginx.conf — add to types block or use default
types {
    text/event-stream  stream;
}

# Or set for a specific location
location /api/ {
    default_type text/event-stream;
}

Related MIME Types

More Text MIME Types

Other text types in the Text family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.