0

I use YQL for by pass cross domain request and It works perfectly. but how does it work?. Well I Google it and red about it. Like it is web service and it create proxy server etc. But I did not understand it. My question is when we make cross domain request then browser denied it because we have a different domain. But YQL is also a different domain so how does it work. for example

We are making request from http://example.com to http://www.example.com using YQL. but http://www.example.com is also cross domain for YQL service

Jitender
  • 7,593
  • 30
  • 104
  • 210
  • 1
    Any webservice that uses [JSONP](http://en.wikipedia.org/wiki/JSONP) with a callback instead of JSON can do cross site references as the *external* site will make a callback to *your* code. Possible duplicate of [What are the differences between JSON and JSONP?](http://stackoverflow.com/questions/2887209/what-are-the-differences-between-json-and-jsonp). – h2ooooooo Feb 18 '15 at 18:20
  • So YQL use jsonp but the url from YQL is getting data does not have jsopn enabled. So how YQL getting data from that URL. For example. I am making request from http://www.example.com to http://example.com using YQL. So question is how YQL is getting data from example.com which is not jsonp enabked – Jitender Feb 18 '15 at 18:43
  • What does the site you're accessing return of contents? Are you sure it's not returning a content type of JSONP and actual JSONP content? Check in your network tab in your browser. You can also check the headers you send and receive. – h2ooooooo Feb 18 '15 at 18:44
  • Supposed your site has json file and I want to access it from my website using YQL. So YQL will access that json file. Because your site, my site and YQL is on different domain – Jitender Feb 18 '15 at 18:57

0 Answers0