Background
“Long polling” is the name used to describe a technique which:

An AJAX request is made (utilizing a javascript framework such as jQuery)
The server waits for the data requested to be available, loops, and sleeps (your server-side PHP script)
This loop repeats after data is returned to the client and processed (usually in your AJAX request’s onComplete [...]