Wow, this is interesting. `window.location.reload` blocks the current script while the `beforeunload` event fires and runs any registered handlers before the current script continues. I didn't even know javascript could do this. Strange.