Dave's Brain

Browse - Programming Tips - A restriction of JSON is that you can only call back to the originating domain.

Date: 2010may26
Language: javaScript
Platform: web

Q.  A restriction of JSON is that you can only call back to the originating domain.
Is there a way around this?

A.  This rule does not apply to <script> so you can inject
<script> tags into your DOM and return JSON.  This exception
maybe be restricted in the future.

Its supposed to be used for scripts but you can used it for data.
Be careful.

More info:
http://en.wikipedia.org/wiki/JSON#JSONP

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.