Comparison between EventSource and WebSocket encapsulated using HTML5 server-side events

PHPz
Release: 2023-08-30 23:41:10
forward
881 people have browsed it

Comparison between EventSource and WebSocket encapsulated using HTML5 server-side events

The event source is just a web socket, -

  • Unable to send data
  • Use text or event stream format
  • The events it triggers are server-defined

It is useful in applications that only require server push.

Web Sockets are suitable for applications that require fast two-way communication.

Another major difference is the different security models they use.

Server Sent Events For-

  • Live Subscription
  • Live Scores
  • Stock Market Updates

The above is the detailed content of Comparison between EventSource and WebSocket encapsulated using HTML5 server-side events. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template