title: jQuery Ajax - downloading incomplete (binary) file
body: <p>This is what I have:</p>
  
  <pre><code>jquery/1.10.2
  
  $.ajax({
      url: "http://samplepdf.com/sample.pdf",
      dataType: "text",
      data: "",
      success: function(data) {
          alert(data.length);
      },
      error: function(a, b, c) {}
  });
  </code></pre>
  
  <p>When I run that locally (in Safari 6.0.5 on OS X), I get 211300. However, the actual file appears to be 218882 bytes. With something fully ASCII (such as <a href="http://www.angio.net/pi/digits/pi1000000.txt" rel="nofollow">http://www.angio.net/pi/digits/pi1000000.txt</a>), it seems to work correctly.</p>
  
  <p>I don't need to download the file, but rather, work with its content. </p>
  
  <p>Is there any way to make ajax work with binary files (either client side or server side) without resorting to using base64?</p>