General-purpose AJAX/long-polling library