First I'll state what I am trying to achieve: I'd like to have some code that connects to my server via websockets. I send messages to the browser to tell it to reload, remotely. I'd like this code (barring it has no errors itself) to not be affected by other page errors, so that I can still hard refresh the page remotely to fix said errors. First I'll state what I am trying to achieve: I