Added using location.href as a fallback to location.host