Using websockets instead of XHR