I am using jQuery for my AJAX calls to an ASP.NET backend using this approach. I am using .ajaxStart and .ajaxStop to show and hide a progress indicator. When the AJAX request finishes very quickly, the progress indicator "blinks" because it is not displayed long enough.
One possible solution would be to display only after a minimum time (like UpdateProgress.DisplayAfter in MS AJAX). Another would be to make sure the indicator displays for a minimum time. Unfortunately, the jQuery Pause plug-in doesn't seem to work, and effect delay tricks like this don't work either. Some sort of solution based on JavaScript setTimeout similar to this SO answer seems most likely, but the problem is that the Ajax call keeps processing. Thus the result gets displayed while the progress indicator is still visible.
So, can it be done? And if so, how?