title: response.responseText adds previous responseText (node.js, prototype)
body: <p>This is my node.js function that uses res.write:</p>
  
  <pre><code>function: ping(){
      res.write(JSON.stringify({"datatype":"ping"}));
      setTimeout(ping, 30000);
  }
  </code></pre>
  
  <p>This is the client, request written in prototype:</p>
  
  <pre><code>    this.pushconnection = new Ajax.Request(pushserveraddress, {
          method: 'get',
          evalJSON: 'false',
          onInteractive: this.pushconnectionInteractive.bind(this)
      });
  }
  
  pushconnectionInteractive: function(response) {
  }
  </code></pre>
  
  <p>The problem is that <code>response.responseText</code> will grow with every <code>res.write</code> that comes through.</p>
  
  <p>Example:</p>
  
  <pre><code>1st ping() received: response.responseText = {"datatype":"ping"}
  
  2nd ping() received: response.responseText = {"datatype":"ping"}{"datatype":"ping"}
  
  3rd ping() received: response.responseText = {"datatype":"ping"}{"datatype":"ping"}{"datatype":"ping"}
  </code></pre>
  
  <p>I'm not sure if node.js is re-sending the data, or if prototype is storing the data. What I need to do is have <code>response.responseText =</code> <em>the last data sent without using <code>res.end();</code></em></p>