freeCodeCamp/guide/english/html/web-sockets/index.md

24 lines
830 B
Markdown
Raw Normal View History

2018-10-19 12:53:51 +00:00
---
title: WebSockets
---
## WebSockets
2018-10-12 19:37:13 +00:00
*Web Sockets* is a technology that allows you to create an interactive connection between a client and a server for exchanging data in real time. WebSockets allow you to work in two streams, which distinguishes this technology from HTTP.
## How do WebSockets work?
WebSockets do not need repeated calls to respond. It is enough to make one request and wait for a response. You can listen to the server, which will send the answer on readiness.
## When can I use WebSockets?
* Real-Time Applications
* Chat application
* IoT applications
* Multiplayer games
## When not to use WebSockets?
WebSockets are already supported in 95% of browsers, but sometimes this technology is not required. For example, if you are creating a simple CMS where real-time functionality is not required.