The ADS protocol in javascript