You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`EventSource` supports cross-origin requests, like `fetch` any other networking methods. We can use any URL:
69
+
`EventSource` supports cross-origin requests, like `fetch`and any other networking methods. We can use any URL:
70
70
71
71
```js
72
72
let source =newEventSource("https://another-site.com/events");
@@ -215,7 +215,7 @@ It offers:
215
215
- Message ids to resume events, the last received identifier is sent in `Last-Event-ID` header upon reconnection.
216
216
- The current state is in the `readyState` property.
217
217
218
-
That makes `EventSource` a viable alternative to `WebSocket`, as it's more low-level and lacks such built-in features (though they can be implemented).
218
+
That makes `EventSource` a viable alternative to `WebSocket`, as the latter is more low-level and lacks such built-in features (though they can be implemented).
219
219
220
220
In many real-life applications, the power of `EventSource` is just enough.
0 commit comments