Could createXHR+open+send only part of the text?

27 views Asked by At

I have a file with some content in it and I would like to use req to send part of the file once a time, for example, each time 500 lines of the content.

========================current code====================================

               var req = createXHR();
               var url = "http://" + report.host + "/real/" + this.fdir + "/" + this.fname + window.location.search;
               req.open("GET", url, false);
               req.send();

Question is:

  1. What can I do to make req only send x to y lines of data, rather than send whole file?

  2. What will happen if I do nothing in the case an extremly large file?

0

There are 0 answers