Adding preload functionality to XHR.