What is the best way of showing progress on an Ajax call?
问题 I have an Ajax call that updates 5,000 records in a database so this takes a lot of time. I have an Ajax "Loading image" showing that something is happening, but I am looking for a better way to show "Updating 50 of 5000 . . .", "Updating 200 of 5000", or something like that. What is the best way to do something like this in Ajax / jQuery without doing 5000 different posts? 回答1: The best I think is using Comet. In Comet-style applications, the server can essentially push data to the client