Modify ↓
Ticket #8193 (closed bug: fixed)
ajaxPrefilter jqXHR.abort() doesn't work
| Reported by: | industral | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.5.1 |
| Component: | ajax | Version: | 1.5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
jqXHR.abort() in $.ajaxPrefilter doesn't work as should be. In fact, abort method just stop passing json data further, but it does a call to a server and get real response, but it shoudn't... As a fix, I use
$.ajaxSetup({
beforeSend: function(jqXHR, settings) {
jqXHR.abort();
}
});
to really abort ajax request to a server.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Thanks for taking the time to contribute to the jQuery project by writing a bug report.
As you didn't provide a test case as described in: How to report bugs, I went ahead and made up this live test case.
This was in fact a bug in jQuery 1.5 and has already been fixed for 1.5.1 in this
Changeset: 03bad0a9600f05e61a1464c55354d26fcd8f97a4
You can verify that with this test case