If you're someone that has a Shopify site but runs an offsite blog (like wordpress) you'll probably want to be able to show the cart contents on that blog. The usual AJAX API calls won't work since you'll hit CORS errors but JSONP comes to the rescue.
Some quick code examples
Vanilla / Plain JS:
grabbing the JS code...
jQuery example lives in the Shopify snippet repo if you need it.