Skip to content
Nicholas Teal edited this page Apr 3, 2018 · 1 revision

<< back to table of contents

JSONP

  • JSON (with padding)
  • Avoids same-origin policy when sharing data
  • Being replaced by CORS
  • requires script tag for each JSONP
    • the script tag allows JS to wrap the JSON object allowing the browser to interpret it
    • script element injection (typically facilitated by helpers included in libraries like jQuery) allows for new script tags to be added to teh DOM with the src attribute set to the url of the JSONP object.

Clone this wiki locally