Wonder if it would be better to use `location.protocol + "//" + location.host`?