@Ipstenu - Presumably the JS uses AJAX to work out when a new post has arrived, and when you are running Varnish, you need to make sure that admin_ajax.php isn't cached for these types of purposes.