Switched to using SocketIO for server-client interaction instead of ajax calls.