An Adaptive Push/Pull Algorithm for AJAX Applications