title: Same Origin Policy - AJAX & using Public APIs
body: <p>I know if on my own webpage, if my user is on :
  <a href="http://www.example.com/form.php" rel="nofollow noreferrer">http://www.example.com/form.php</a><br/></p>
  
  <p>and I make an ajax request from that page to : 
  <a href="http://example.com/responder.php" rel="nofollow noreferrer">http://example.com/responder.php</a><br/></p>
  
  <p>It will fail because of the Same origin policy (subdomain is different). </p>
  
  <p>What I am trying to understand is, how is it that AJAX requests can pull data from API's like flickr when the request and server are obviously different.</p>
  
  <hr>
  
  <p><strong>Edit :</strong><br/><br/>
  eg: Why does this code work?</p>
  
  <pre><code>$.getJSON('http://api.flickr.com/services/rest/?&amp;;method=flickr...'
  </code></pre>
  
  <p>(<a href="https://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy">Referred this Community Wiki</a>)
  Is it using <a href="http://www.w3.org/TR/2010/WD-cors-20100727/" rel="nofollow noreferrer">Cross Origin Resource Sharing</a>?</p>
  
  <p>Thanks!</p>