Starting a long process asynchronously

In our web application, the user can make changes that require updating a large number of database tables. Download time for anything that can be up to 30 seconds. I do not want the user to wait for the completion of this process before moving to another page.

I put a long code on my page (say, “updateinfo.aspx”) and tried several solutions, including jQuery AJAX calls to “updateinfo.aspx” or loading an image file that calls “updateinfo" .aspx. In all cases, I don't I can move from the original HTML page that launched the AJAX call to another HTML page while executing “updateinfo.aspx.” Chrome says that a request for “updateinfo.aspx” is pending. When I click the link to go from the original HTML pages, we are "Waiting for example.org ..." until the AJAX page is complete, followed by request for transition to the next HTML page and a new cargo page.

Thus, it aims to put long code on the AJAX page. A custom page is displayed quickly, but they cannot continue their day by switching to another page until the AJAX page is complete. I don't care about the exit of the AJAX page.

Any thoughts?

+3
source share
1 answer

You do not have to perform a lengthy process in the context of a web page; the HTTP Request / Response model is not favorable for this concept when the client application is a web browser. This is a scenario that I had to solve several times; You can: -

  • Use MSMQ send a message to the queue containing information about the operation being performed, or
  • , , ""

Windows / .

, , , ( ), jQuery Ajax 15 , , , , .

-, , ?

+1

All Articles