Replace MessageEvent with ajax call in reader setup