Utilisation of websocket instead of AJAX