ie9 doesn't support location.origin