JavaScript client implementation of XHTTP