I do it all the time. As long as you are connecting to the same server that you loaded the page from, then you are all set. This is how I normally make JSON requests:
var url = '{{=URL('some.json')}}/'; jQuery.getJSON(url).success(function(data) { // finished successfully alert(data); }).fail(function(err) { // ajax failed alert(err); }); There are many ways to do this, but this one seems to be the most robust for me, as it can catch connection and server errors.