browser.js now checks for a protocol before attempting to resolve

This solves the problem where you need to connect to a websocket on a different server than is serving the page.

Credit to @dominictarr for quickly pinpointing the issue from my use of `reconnect`