请求方式对比 Demo

LLM 作用于 once / stream / SSE / JSONP / iframe / WS;长轮询与 Beacon 仍为 mock

技术 × 场景 矩阵

技术 \ 场景 单次请求 流式接收 长轮询 全双工 只发不收
XHR✓✓ readyState 3✓——
Fetch✓✓ ReadableStream✓——
EventSource—✓ 服务器推———
iframe—✓ Forever Frame———
WebSocket—✓ 双向—✓—
WebTransport—✓ 多流—✓ HTTP/3—
HTTP/2 Push—已移除——曾推资源
JSONP✓ <script>————
Beacon————✓ sendBeacon
Image————✓ <img src>