I have a tool which takes any time from a minute to couple of hours. I want to write a web application to enable users to run the tool from webpage. Since each tool run takes longer time, i want to send the tool run request from the webpage, then i want to update the page with status information. For updating the status information, the client has to poll the server. Is there any way by which server can send the status message to the client without a request
I have a tool which takes any time from a minute to couple of hours. I want to write a web application to enable users to run the tool from webpage. Since each tool run takes longer time, i want to send the tool run request from the webpage, then i want to update the page with status information. For updating the status information, the client has to poll the server. Is there any way by which server can send the status message to the client without a request
Share Improve this question asked Mar 31, 2012 at 17:41 SANSAN 2,2474 gold badges26 silver badges33 bronze badges2 Answers
Reset to default 11You can use web-sockets which are two way munication between client and server that remain open and allow the server to send without request from the client. However web-sockets are new and browser support is only for the most current browsers.
socket.io is a great library for web sockets with fall backs to AJAX and flash if they are not supported.
Other than that the only other way for the server to send data to the clients is after the client has sent a request. There is methods using AJAX polling from the client to check for updates from the server.
Try reverse AJAX call using DWR!
check this click for demo and source