title: insert some data after response on node.js
body: <p>I wrote a website tracker for internal use, since Google Analytic don't meet the requirement. </p>
  
  <p>I use node.js with Express to develop that tracking system. Everything works well so far. But I want to confirm is, if there is some problem behind if I insert a log data after response a image.</p>
  
  <p>Thanks!</p>
  
  <pre><code>function image_response(req, res, next){
      var buf = new Buffer([0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b]);
      res.send(200, buf);
      next();
  }
  
  app.get('/tracker.gif', image_response, function(req, res){
       // blah blah blah 
       // DB insert codes..
  }
  </code></pre>
  
  <p>Actually the "image_response" is completely end of the response and close the browser connection with client. Afterward, doing the logic to save the data to DB.</p>