I have the following javascript redirect code followed by some more code.
window.location.href = \'/someurl\'; alert(\'hello\'); alert(\'hello again\');
The browser will try to execute the code after window.location.href = 'url' until the page goes to the next web adress, so the number of lines of code that will be executed depends on the browser's speed
window.location.href = 'url'