In my application, when a user requests a report, a jQuery AJAX call is made (using .load()) to a file that executes a lot of crunch requests and the number of mySQL queries. it usually takes 5-6 seconds to load, and .ajaxStart()they .ajaxStop()are used to display the boot gif at boot time.
Problem:
If the user clicks the "generate report" button, and then changes his mind and tries to go to another page that is hanging by the application, and does not go to a new page within 5-6 seconds. I can tell from the removal of the gif download that .ajaxStop()fires immediately when I try to go to a new page, but it seems that the ajax request ends before the browser loads the next page.
Is this normal behavior? Any suggestions for fixing / restructuring this?
source
share