Side navigation
#13806 closed feature (migrated)
Opened April 21, 2013 02:47PM UTC
Closed October 21, 2014 12:14AM UTC
JSONP error handler for cross origin requests is triggered only after timeout
Reported by: | ri.joel@gmail.com | Owned by: | ri.joel@gmail.com |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | ajax | Version: | 1.9.1 |
Keywords: | Cc: | jaubourg | |
Blocked by: | Blocking: |
Description
The JSONP error handler is triggered for HTTP errors (e.g. 404) for same origin requests immediately, but for cross origin requests only after the timeout occurred. This can be easily fixed with adding script.onerror (see Zepto.js).
Tested browsers:
Affected: Chrome 26, Firefox 20, Safari 6, Opera 12.14
Not affected: IE 9
I will provide a patch later.
Attachments (0)
Change History (6)
Changed April 29, 2013 03:15PM UTC by comment:1
Changed April 29, 2013 03:15PM UTC by comment:2
cc: | → jaubourg |
---|
Changed April 29, 2013 06:43PM UTC by comment:3
@dmethvin, yes, but I am quite busy at the moment. I think script.onerror together with script.onreadystatechange covers the most browsers, but I am not sure about Opera. I found out that it is already fixed in jQuery 2. The reason why it works for same origin requests is that it uses XMLHttpRequest internally (altough the format is JSONP).
Changed May 02, 2013 08:33PM UTC by comment:4
component: | unfiled → ajax |
---|---|
owner: | → ri.joel@gmail.com |
priority: | undecided → low |
status: | new → assigned |
type: | bug → feature |
Changed July 29, 2013 04:54PM UTC by comment:5
Pull request: https://github.com/jquery/jquery/pull/1317
Changed October 21, 2014 12:14AM UTC by comment:6
resolution: | → migrated |
---|---|
status: | assigned → closed |
Migrated to https://github.com/jquery/jquery/issues/1743
Are you still interested in providing a patch? How widespread is
.onerror
support in XHR?