{
    "content": "<h1>Server-Sent Events (SSE)<\/h1><p><a href=\"..\/Server-Sent-Events\/\">Server-Sent Events<\/a> (SSE) is a standard for pushing real-time notifications from a server to a <a href=\"..\/Browser\/\">Browser<\/a> over a single <a href=\"..\/HTTP\/\">HTTP<\/a> connection. Unlike <a href=\"..\/WebSockets\/\">WebSockets<\/a>, which provide full-duplex, bidirectional communication, <a href=\"..\/SSE\/\">SSE<\/a> is strictly unidirectional, sending data from the server to the client. This makes it a highly efficient choice for applications like live news feeds, social media updates, and financial tickers where the client does not need to send frequent data back to the server.<\/p><p>The technology is part of the <a href=\"..\/HTML5\/\">HTML5<\/a> specification and utilizes the <a href=\"..\/JavaScript\/\">JavaScript<\/a> <a href=\"..\/EventSource\/\">EventSource<\/a> API to manage the connection. According to the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Server-sent_events\">MDN Web Docs<\/a>, the server must respond with the <code>text\/event-stream<\/code> MIME type and keep the connection alive. A significant advantage of <a href=\"..\/SSE\/\">SSE<\/a> over <a href=\"..\/Long-Polling\/\">Long Polling<\/a> is its native support for automatic reconnection and event identification, as detailed in the <a href=\"https:\/\/html.spec.whatwg.org\/multipage\/server-sent-events.html\">WHATWG<\/a> Living Standard. Because it operates over standard <a href=\"..\/HTTP\/\">HTTP<\/a>, it often bypasses firewall restrictions that might block other protocols.<\/p><ul><li><a href=\"..\/WebSockets\/\">WebSockets<\/a><\/li><li><a href=\"..\/Real-Time-Web\/\">Real-Time-Web<\/a><\/li><li><a href=\"..\/HTTP-Streaming\/\">HTTP-Streaming<\/a><\/li><li><a href=\"..\/Push-Technology\/\">Push-Technology<\/a><\/li><\/ul>",
    "tags": [
        "sse",
        "server-sent events",
        "html5",
        "real-time",
        "http",
        "web-api",
        "javascript",
        "networking",
        "streaming",
        "frontend",
        "backend"
    ]
}