I have the following javascript redirect code followed by some more code.
window.location.href = \'/someurl\'; alert(\'hello\'); alert(\'hello again\');
The Javascript session will struggle to continue it's mission in the face of impending doom. Coding in this manner is considered unpredictable. ...and cruel.