I have a third party javascript library which only operates when the window.location property is set correctly. I want to seperate it from the page. At the moment I do cancel the request but modify the response. It would be nicer to cancel the request before it is done than modifying just the response.