开发者

What are and how to deal with the effects on the browser of an unusually long backend processing for a form submission?

For example, a browser submits a form thus posting a request, and the servlet that accepts it does an unusually long time to finish its processing. By the time the servlet finishes and serves the page back to the browser, will the client browser still be able to display things correctly (probably depends on the browser)?

Although in my experience, one observation I noticed in IE, the page display becomes "incomplete" even when the processing has completed (by verifying the logs which says processing done). I was expecting though that if the browser waits until page is served back to it, it will still display things correctly.

开发者_StackOverflowWhat are other possible effects (that I should be aware of) and are they probably affecting the client-side only? How to can I deal with this given that some form submissions will really take a long time, for example a full-text search, and the user is willing to wait for the result?


How long is long? You could use AJAX to show a wait dialog to the user otherwise your UI in the browser will hang until something returns back from the server.

Do you really want the user to wait for a long time? The ideal way is to batch process stuff in the server and make the user come back for it. I know thats not the answer you were expecting, but thought I'll state what I have generally done before :)

I am not entirely sure if the connection will time out if there is no response from the server after a certain time. That might be the reason why IE didnt display anything even though the server finished.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜