......? 0 Newbie Poster

Hello everyone!
To get incoming message in fb-chat, browsers send request in certain interval (i think 55.31s). But if there is message it fetches message and terminates before starting new. Can anyone explain how it is done

Regards