title: What is the disadvantage of using websocket/socket.io where ajax will do?
body: <p>Similar questions have been asked before and they all reached the conclusion that AJAX will not become obsolete. But in what ways is ajax better than websockets?</p>
  
  <p>With socket.io, it's easy to fall back to flash or long polling, so browser compatibility seems to be a non-issue.</p>
  
  <p>Websockets are bidirectional. Where ajax would make an asynchronous request, websocket client would send a message to the server. The POST/GET parameters can be encoded in JSON. </p>
  
  <p>So what is wrong with using 100% websockets? If every visitor maintains a persistent websocket connection to the server, would that be more wasteful than making a few ajax requests throughout the visit session?</p>