read with XMLHttpRequest