title: How to interact with Web server using JavaScript
body: <p>I am trying to develop an Interactive chat application using AppWeb open source web Server.<br>
  I need to have some machanism that will enable Web server to send updated messages to client, so that when remote usre sends messages that will get updated automaticaly at the client end.  </p>
  
  <p>There are some methods to do this using HTML5 Web Sockets and  Server sent events.<br>
  But we need to implement it in HTML and JavaScript only not HTML5.  </p>
  
  <p>So I need some pooling machanism that will keep pooling my Web Server for New events.</p>
  
  <p>So how should I write pooling machanism in Javascript using Sockets.<br>
  How it should be implemented at server end?</p>
  
  <p>Thanks!</p>