Should I ditch AJAX in client side web development when I've got a web-socket open?
Posted
by
jt0dd
on Programmers
See other posts from Programmers
or by jt0dd
Published on 2014-06-10T01:20:28Z
Indexed on
2014/06/10
3:41 UTC
Read the original article
Hit count: 346
AJAX
|websockets
I was thinking that maybe I should forget AJAX (HTTP) requests when I've got a web-socket open between client and server, but I decided I should ask here to check if this could be a bad practice for some reason that I'm not thinking of.
Once the socket is open, there's less syntax (often meaning simpler error handling) involved in passing information between client and server with Socket.io (just one example of a web-socket).
Is there some obvious situation where a web-socket (Socket.io for example) isn't going to be capable of handling a functionality that an AJAX request could do easily?
© Programmers or respective owner