Simple Tutorial on using JSONP versus JSON with JQuery
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
.gitignore
Gemfile
Gemfile.lock
LICENSE
Procfile
README.md
config.ru
json_jsonp_app.rb
robots.txt

README.md

Practical Tutorial on JSON versus JSONP in JQuery

JSONP is a simple way to overcome browser restrictions when sending JSON responses from different domains from the client.

But the practical implementation of the approach involves subtle differences that are often not explained clearly.

Here is a simple tutorial that shows JSON and JSONP side by side.

It assumes that you are familiar with basic JQuery functions and have basic experience of server-side applications.

Specifically the tutorial uses a simple Sinatra server, written in Ruby

See the page public/index.html for the Tutorial itself.

A live version of the tutorial is at http://json-jsonp-tutorial.craic.com