Javascript Is This Websockets Approach Correct Stack Overflow

Javascript Is This Websockets Approach Correct Stack Overflow