EventSource(常写作 EventSource,也可理解为 “event source”)指事件来源/事件源;在网页开发中更常指浏览器的 EventSource 接口:用于建立到服务器的单向长连接,以接收 SSE(Server-Sent Events,服务器发送事件) 的持续推送数据。(在其他语境里也可泛指“事件的来源”。)
/ɪˈvɛnt sɔːrs/
The page uses EventSource to receive live updates.
这个页面使用 EventSource 来接收实时更新。
After the user logs in, the app opens an EventSource connection so the server can push notifications without the client repeatedly polling.
用户登录后,应用会打开一个 EventSource 连接,这样服务器就能推送通知,而不必让客户端反复轮询。
由 event(事件)+ source(来源) 组成,字面意思是“事件的来源”。在 Web 标准中被用作接口名 EventSource,强调“事件从服务器端持续流向客户端”的数据通道。
由于 EventSource 主要是技术术语,更常见于技术标准与文档中,例如: