Difference between reverse ajax and normal ajax

Can anyone please describe to me the difference between reverse ajax and normal ajax. If possible, explain what reverse ajax can do in the web world, some real world examples too.

I've never used this reverse ajax, is it apt for a normal web application?


source to share

2 answers

Plain ajax, you need to periodically poll your server from your client.

For reverse ajax, the server pushes the update to your client when it has.



Reverse Ajax: Essentially a concept: the ability to send data from the server to the client. In a standard HTTP Ajax request, data is sent from the client to the server.

Other closely related terms are HTTP poll, long poll, comet, server push, websockets in HTML5.

Comet is a web application model where a request is sent to the server and persists for a long time until a timeout or server event occurs. When the request is complete, another long-lived Ajax request is sent to wait for other server events. With Comet, web servers can send data to a client without an explicit request.

Here is a sample demo I shared on github to show reverse ajax using async function for servlet 3.0 https://github.com/uravik21/ReverseAjax-JspTagJspFragment



All Articles