David Chang wrote:
Hi, does any one know how google analytics (urchin.js) works?
Poorly, as it is predicated upon assumptions that are false.
I always thought javascript
cannot talk to multiple servers due to security constraints.
<snip>
Generally javascript (or, more precisely, browser object models) cannot
receive information from multiple domains (or interact with information
received from multiple domains). That does not mean it cannot send HTTP
requests to multiple domains (GET requests with data sent in query
strings). This has, for example, been possible when setting the SRC
properties of Image objects; the request is sent, the image returned
(if the remote server is happy to do so), but javascript is prevented
from interacting with the object as a result of its having loaded
'alien' data. However, this ability to make requests to any HTTP server
is likely to be removed soon as security concerns have recently been
raised in connection with it (the implied ability to scan network-local
servers for images and so deduce network configuration information).
Richard.