Does google-hosted jquery helps google to track vi

2020-08-26 11:30发布

问题:

If you put, on your web site, one of google's services such that google analytics, google+, +1, youtube embedded video, etc... Basicaly you allow google (or other company for other services) to track the visitor of your website: Google will know who goes on your website.

My question is: if you use the jquery files stored on google's server (see above), do you also allow google to track your users?

< script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js">

In this situation, I am not sure that google can know that the visitor that query the jquery files is visiting your website.

回答1:

Well, one of the main reasons to use http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js is because of caching:

No matter what site a user visits, when the browser sees the reference to the google-hosted copy of jQuery, it understands that all of those references do refer to the exact same file. With all sites having google-hosted references pointing to exactly the same URLs, the browser can trust that those files truly are identical and won't waste time re-requesting the file if it's already cached. Thus, the browser is able to use a single copy that's cached on-disk.

There are more stackoverflow questions about this subject, for example this and this.

About the tracking, I guess so. When the users browser sends a request to google's server, google will get the users browser headers, which probably will contain a referrer field, his IP, and any leftover tracking cookies for that domain. However, as said because the google CDN stuff gets cached, it not very effective for tracking purposes, as they will only know about the first time someone downloads the library.



回答2:

Yes, Google is not offering these things out of the goodness of their heart.

Your browser will still send a request to their server to ask if the file has been modified before using the cached copy. Their tracking cookie is sent with that request.

I collected the kind of data on people that Google does, I'd be arrested for stalking.