Skip to content

[jQuery.ajax about jsonp] error description for dataType and more explicit description for url #959

Closed
@Aqours

Description

@Aqours

URL: http://api.jquery.com/jQuery.ajax/

  1. An error description for dataType
    qq 20160722102217
    Actually cross-domain "json" requests will be not converted to "jsonp".
  2. JavaScript code
// the url of current page is
// http://www.a.com
// then send a request
// http://www.b.com/search.php support jsonp
$.ajax({
    url: "http://www.b.com/search.php?callback=?",
    data: {
        // ...
    },
    dataType: "json"
});

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 than dataType: "jsonp" occasionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions