Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 575 Bytes

README.rdoc

File metadata and controls

23 lines (12 loc) · 575 Bytes

jQuery safe xdr

jQuery plugin to make Cross Domain Requests with JavaScript without jsonp.

To receive some response for this calls, you have to add the Access-Control-Allow-Origin HTTP header.

Samples

  1. Submitting a request

    $.safeXDR('http://sampleurl', {param1:'value1'});
  2. Enable cache

    $.safeXDR('http://sampleurl', {param1:'value1', cache:true});
  3. Receiving response (Needs Access-Control-Allow-Origin):

    $.safeXDR('http://sampleurl', {param1:'value1'}, function(result){
        console.log(result);
    });