-
Notifications
You must be signed in to change notification settings - Fork 264
[jQuery.ajax about jsonp] error description for dataType and more explicit description for url #959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Doesn't your example show the documentation is correct? |
|
I recently noted this issue as well. The section that is particularly confusing is listed below, please note bold italicized text.
From this section of the docs I would gather that, using the example that @Aqours gave, the following would result:
The above however does not occur, no callback is appended nor is the // Option 1: `callback=?` in url
$.ajax({
url: 'https://www.b.com/search.php?callback=?',
dataType: 'json'
});
// Option 2: `dataType` set to `jsonp`
$.ajax({
url: 'https://www.b.com/search.php',
dataType: 'jsonp'
}); In light of this, the following seems more accurate:
A more extensive set of examples of this behavior can be found at: https://github.com/onebytegone/jquery-ajax-jsonp Note: This behavior has been confirmed in jQuery v1.11.0, v1.12.4, v2.2.4, and v3.1.1. |
This sounds like a very good clarification, can you submit a PR at https://github.com/jquery/api.jquery.com/? The current docs are consistent in that |
@dmethvin are you sure you wanted to close this issue? |
Duh, no! I must have confused two tabs at the time. @onebytegone you are in the right place! 😕 |
@Aqours Why did you close it? Reopening. |
@mgol For a long time no one had dealt with this issue. Remain issue opened if you track it. |
@Aqours All of the people working on this repo are volunteers and we have limited manpower so there are silent periods. |
URL: http://api.jquery.com/jQuery.ajax/
Actually cross-domain
"json"
requests will be not converted to"jsonp"
.This request will be auto converted to
"jsonp"
. Write this feature on jQuery document that will be good for users. I think this way is more useful thandataType: "jsonp"
occasionally.The text was updated successfully, but these errors were encountered: