Is there any way of determining just the site URL (e.g. just http://www.example.com/) in JavaScript being executed from any page on that site?
If the page has the base tag, it's quite easy:
document.getElementsByTagName('base')[0].href;
I'm wondering if there's a more generic method.