Side navigation
#3227 closed bug (wontfix)
Opened August 07, 2008 02:43AM UTC
Closed January 28, 2011 01:21AM UTC
Last modified March 14, 2012 09:29PM UTC
JSONP requests don't trigger AJAX callbacks
Reported by: | reedom | Owned by: | kswedberg |
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | ajax | Version: | 1.4.4 |
Keywords: | jsonp | Cc: | |
Blocked by: | Blocking: |
Description
With a request like $.ajax({ url: otherSite, dataType: 'jsonp' }) jQuery doesn't call the beforeSend callback.
Attachments (0)
Change History (8)
Changed August 07, 2008 01:11PM UTC by comment:1
need: | Review → Patch |
---|---|
owner: | → flesler |
status: | new → assigned |
Changed May 16, 2009 02:21AM UTC by comment:2
The beforeSend function is passed the xhr object used to make the request. Since jsonp requests don't have an xhr, that would be problematic. There are several other options with a similar issue, plus all the global ajax events.
I am starting to think that jsonp is sufficiently different that it should have its own method.
Changed December 03, 2010 04:22PM UTC by comment:3
keywords: | jsonp → jsonp needsdocs needsreview |
---|---|
milestone: | 1.3 → 1.next |
owner: | flesler |
priority: | major → low |
status: | assigned → open |
version: | 1.2.6 → 1.4.4 |
As jsonp uses a <script>
tag for doing jsonp requests there are quite a few callbacks that don't get triggered. According to my test case these are the following beforeSend, ajaxSend, dataFilter, error, ajaxError, ajaxStop
. This needs some discussion to determine which events should be called and for which we can get away with updating the documentation.
Changed December 27, 2010 10:36PM UTC by comment:4
keywords: | jsonp needsdocs needsreview → jsonp,needsdocs,needsreview,ajaxrewrite |
---|
Changed January 09, 2011 03:35PM UTC by comment:5
In new implementation, beforeSend and dataFilter are always called, no matter the request type.
error, ajaxStart, ajaxStop, ajaxSend, ajaxError will be called if the unerlying tranport ensures completion (error detection) so cross-domain script & jsonp requests will never call them.
Changed January 14, 2011 03:29AM UTC by comment:6
keywords: | jsonp,needsdocs,needsreview,ajaxrewrite → jsonp,needsdocs,ajaxrewrite |
---|---|
owner: | → kswedberg |
status: | open → assigned |
I'll assign to Karl but I think we pretty much covered it in our first documentation meeting.
Changed January 28, 2011 01:21AM UTC by comment:7
keywords: | jsonp,needsdocs,ajaxrewrite → jsonp,needsdocs |
---|---|
milestone: | 1.6 → 1.5 |
resolution: | → wontfix |
status: | assigned → closed |
Jaubourg already stated why not all callbacks will be called for jsonp requests. This will be covered in the documentation
Changed February 03, 2011 05:31PM UTC by comment:8
keywords: | jsonp,needsdocs → jsonp |
---|