how does urchin.js (google analytics) work

Discussion in 'Javascript' started by David Chang, Sep 1, 2006.

  1. David Chang

    David Chang Guest

    Hi, does any one know how google analytics (urchin.js) works? I always
    thought javascript
    cannot talk to multiple servers due to security constraints. But google
    analytics seems to
    be able to track down a user's web browsing activities and send them back to

    I deeply appreciate that if some one can shed some light on me regarding

    Thanks !!

    David Chang, Sep 1, 2006
    1. Advertisements

  2. Poorly, as it is predicated upon assumptions that are false.

    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 Cornford, Sep 1, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.