title: Reading a live log file from javascript
body: <p>I am using following code to read data from a text log file which is continually growing.</p>
  
  <pre><code>setInterval(call, 1000);
  
  function call() {
    $.ajax({
      type: "GET",
      url: "GenNumber.txt",
      dataType: "text",
      success: function(data) {
        readdata(data);
      },
    });
  }
  </code></pre>
  
  <p>My query is , does ajax reads complete file in every call or the (new) added lines from last call. If it reads entire file in each call, it may crash when file size bigger and bigger. Is there any way to read only new lines from the last call and stop the program when file stops growing.</p>
  
  <p>Thanks</p>