do we need to parse the locationUrl again? we should do it just once and then compare the url against that result.

so the api should actually be just: isSameOrigin(url)