AJAX URL request doesn't work from desktop

Posted by Aaron on Stack Overflow See other posts from Stack Overflow or by Aaron
Published on 2013-06-24T13:57:19Z Indexed on 2013/06/24 22:22 UTC
Read the original article Hit count: 365

Filed under:
|

Running this simple AJAX with WAMP localhost I can pull JSON from a web address.

$(document).ready(function(){
   $.ajax({
      url: 'http://time.jsontest.com/',
      dataType: 'jsonp', 
      success: function(json) 
      {
          console.log(json);
      }
  });
});

However I cannot connect if I try running normally through a browser, why is that?

Google CDN:

<src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX