put network requests into js to avoid blocking spotlight