Example explained: Receive Server-Sent Event Notifications
- Create a new EventSource object, and specify the URL of the page sending the updates (in this example "demo_sse.php")
- Each time an update is received, the onmessage event occurs
- When an onmessage event occurs, put the received data into the element with id="result"
Category: | Web Tutorial |
Sub Category: | HTML SSE API |
Uploaded by: | Admin |