Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery getJSON cross domain

I'm trying to get the data with jQuery Cross Domain (on github).. but without success! I read that i must make a request jsonp, but I do not understand what is wrong..

http://jsfiddle.net/jzjVh/

Chrome interprets the file as Javascript.. IE9 except a warning because the file "was blocked due to mime type mismatch".. I do not even understand if there is a difference from .txt and .json.

like image 816
Ermes Enea Colella Avatar asked Dec 20 '25 11:12

Ermes Enea Colella


1 Answers

And here we go again...
You are fighting with http://en.wikipedia.org/wiki/Same_origin_policy.

enter image description here
While

enter image description here

Possible solution will be using a local proxy like http://developer.yahoo.com/javascript/howto-proxy.html

enter image description here

like image 92
Ajinkya Avatar answered Dec 22 '25 01:12

Ajinkya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!