Does changing window.location stop execution of javascript?

Posted by Aleksander Kmetec on Stack Overflow See other posts from Stack Overflow or by Aleksander Kmetec
Published on 2010-03-29T09:08:48Z Indexed on 2010/03/29 9:13 UTC
Read the original article Hit count: 415

Filed under:

When writing server-side code you need to explicitly stop execution after sending a "Location: ..." header to the client or your code will continue to execute in the background.

But what about when you change window.location in a client-side script? Does this immediately stop execution of the current script or is it up to the programmer to make sure that any code located after this call is not reached?

© Stack Overflow or respective owner

Related posts about JavaScript