I'm just wondering if it makes sense to have a callback function when the jQuery getJSON function succeeds if I use JSONP.
From the documentation:
http://api.jquery.com/jQuery.getJSON/
jQuery.getJSON( url [, data] [, success(data, textStatus, jqXHR)] )
The success function is executed after a successful JSON response.
However, if we use JSONP, where the function callback is in the JSONP response, does the function need "success"?
I suppose not, but I cannot find any information on the page to confirm it. I just donβt want to lose sight of any security problem if there is a reason to use the Success function.
Thanks!
source share