This is not possible because Javascript is single-threaded and a synchronous call blocks UI updates.
However, before starting an AJAX synchronous call, you can display the animated download schedule and delete it if it succeeds or fails. I believe that most browsers will be able to continue rendering an animated gif even with technical blocking of a synchronous call.
source share