Explain the concept of HTML5 WebSockets and its advantages over traditional HTTP communication.
Instruction: Discuss the mechanism of WebSockets in HTML5 and its benefits.
Context: This question probes the candidate's understanding of advanced HTML5 features, specifically WebSockets, and their ability to articulate the advantages of real-time, bi-directional communication over traditional HTTP.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
WebSockets Mechanism: At its core, the WebSocket protocol facilitates a persistent connection between the client and the server...