I want to create a facebook-like notification system (the one who appears on the bottom-left side of the screen when someone comment on your post, for example).
The thing here is that the server needs to send you a notification when someone comments in the site in this exactly moment. I think this is called PUSH-System (sorry for my bad english).
I tried with node.JS but my dedicated server can’t install it. Only if I buy a very expensive VPS plan.
So, is there a way using jQuery or something like that to make this Push notification system?
Thanks !!
, rodrigo.-
If you want a low latency, efficient solution you should use WebSockets. However you need to have fallbacks in place such as long-polling / short polling available if the browser doesn’t support WebSockets.
The WebSocket Protocol provides a full-duplex (two way) connection between the server and client. Traditional HTTP is half-duplex (one way). This link will give you an overview of the benefits of using WebSockets vs HTTP: http://www.websocket.org/quantum.html.
You need to be aware that most modern browsers support WebSockets, but use different protocols. See here: What browsers support HTML5 WebSocket API?.