#9782 closed bug (duplicate)
error 'jQuery16206078858876646126_1310116245411 is not a function' after abort POST JSONP ajax-query
Reported by: | anonymous | Owned by: | anonymous |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | ajax | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
example:
var p = $.ajax({ url : 'http://suggest.yandex.ru/suggest-ya.cgi', data : { part : 'test', v : 3 }, dataType : 'jsonp'});
setTimeout(function() { p.abort(); }, 10);
Change History (5)
comment:1 Changed 12 years ago by
Component: | unfiled → ajax |
---|---|
Owner: | set to anonymous |
Priority: | undecided → low |
Status: | new → pending |
comment:2 Changed 12 years ago by
When abort jsonp request you need no remove callback at once. If you replace callback at this moment something like this, you have no error:
window.jQuery16207753935731721285_1310374972748 = function() {
delete window.jQuery16207753935731721285_1310374972748;
}
comment:3 Changed 12 years ago by
We are hitting this scenario as well in our scenarios.
If you abort a jsonp request, the response is still processed, causing a script error because the callback function was nuked.
Please fix this. Thanks.
comment:4 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | pending → closed |
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket.
Additionally, test against the jQuery (edge) version to ensure the issue still exists.
I do not think jsonp can be aborted consistently across browsers. Once the script tag is on the page, some browsers will load the script whether you take the tag off or not.