I have a search filter that runs an ajax request to update a result set when changing filters. It often happens that the user will change many filters at a time, selecting many AJAX requests.
So, I decided to abort previous requests if a new one was made (using the ajax.abort () function). Now ... Firebug shows all these requests as aborted, but the last request (the only one that is not interrupted) is more and more interrupted than before the requests were interrupted.
So, for example, if I change only one filter, it takes 1 second to load the request. But if I change 5 filters at a time, it will cancel 4 of them, leaving only the last request. However, this request ends in 5 seconds.
Does anyone know why this is? I assume that although jQuery interrupts the request, is my server still processing it? (I run local Rails Mongrel in development mode, fyi). This view strikes the whole reason why I interrupted requests ... What can I do to solve this problem?
Help is much appreciated!
source
share