I\'m writing an app and I need to access some json data in the client side from another server. Because of the cross domain issue I plan on using jsonp. jQuery allows me to
When the dataType is jsonp, jquery won't fire the error function automatically. This is described in the documentation under the "error" option:
Note: This handler is not called for cross-domain script and JSONP requests. see here.
The workaround is to explicitly specify a timeout as an option. If the server doesn't respond in the specified amount of time then the error function will be called. More about this here.