java - How to get cross-domain JSON from jQuery? -
i trying json (getjson()) server doesn't have support jsonp implemented. namely, when adding callback=?
url, server return data, returns pure json without padding.
i understand must corrected server-side - there no way resolve in jquery. correct?
if cors support not supported server jsonp
, might try proxy approach in such cases. 1 example http://www.corsproxy.com/, there should other proxy alternatives too.
what do?
cors proxy allows javascript code on site access resources on other domains blocked due same-origin policy.
how work?
cors proxy takes advantage of cross-origin resource sharing, feature added along html 5. servers can specify want browsers allow other websites request resources host. cors proxy http proxy adds header responses saying "anyone can request this".
Comments
Post a Comment