Improve XHR detection
wip