title: How does Gmail's periodic mail fetching work?
body: <p>When I am using gmail, some new mails that I just received appear on the inbox, even if I did not refresh the page. I believe that would done in Ajax.</p>
  
  <p>Is there any good demo that works very similar to it? Periodically checking and getting JSON data (I am not sure if it is JSON data..) to fetch new data??</p>
  
  <p>Thanks!</p>