title: What is AJAX HeartBeat and what is the difference between it and setInterval
body: <p>I want to know what is exactly AJAX heartbeat pattern and what is the difference between it and jquery setInterval </p>
  
  <p>Because im making an AJAX chat and I don't want to pull the data every 15 seconds I want to make a connection to the server to avoid delay is that what called heartbeat  ?
  Also I want a good tutorial to make this or any suggestion from you </p>
  
  <p>Note: I have completed the implementation with setInterval but I saw that heartbeat is better way to avoid delay </p>