Have a look at
That is not about document.location to be the same. It must be the same
domain, where "domain" in the cross-domain issue means:
http://www.server.com
or
http://www:1234.server.com
so:
[protocol] [subdomain(s)] [port] [domain] [high-level domain]
where all parts must be the same (or equally not presented). After that
you can have as many differences as you want, but the smallest
difference in any of above parts will trig the cross-domain block (in
default security environment).
In this aspect Google is in the same sorry situation as anyone else, so
if their ajaxoid works across domains than:
1) They are using some sross-browser vulnerability exploit in
IXMLHTTPRequest / XMLHttpRequest object (highly unlickly).
2) They are using standard server-side workarounds for cross-domain
lock (the latter over the last two years became an annoing bug to fix
in each solution, rather than a security mesure of any kind).