The difference between JSON and JSONP, the difference between Ajax and JSONP

Source: Internet
Author: User

JSON and JSONP, although there is only one letter difference, but they do not relate to each other.

JSON is a lightweight format for data interchange.

Jsonp is a cross-domain data interaction protocol.

The advantages of JSON: (1) based on plain text transmission is extremely simple, (2) Lightweight data format suitable for Internet transmission, (3) easy to write and parse.

The difference between Ajax and JSONP:

The same point: all requests a URL

Differences: The core of Ajax is getting content through XMLHttpRequest

The core of JSONP is the dynamic add <script> tag to invoke the JS script provided by the server.

The difference between JSON and JSONP, the difference between Ajax and JSONP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.