Why is Google hosting common Javascript/AJAX Libraries?
This post will be published to the public later today, with a unique URL (/google-ajax-api.html) and the above title.Thanks for reading and following.
I have a question I would like to try and answer, and I need some help. Why is Google hosting popular Javascript/AJAX libraries like jQuery, Prototype, script.aculo.us, MooTools, Dojo, SWFObjectNew!, and even user interface libraries like the Yahoo! User Interface Library (YUINew!) and jQuery UI?
My follow up question is why website developers are making use of those hosted services, but first I need to understand Google’s intent.
Perhaps you didn’t know (because you are an SEO and not a coder, or an owner and not a coder) that your website is loading its javascript libraries off of Google’s servers, every single time they are needed. Google offers this seemingly benevolent service for free (read the offer here).
Perhaps you didn’t realize that under this arrangement, Google can see the IP and referrer of every incoming visitor. Is this just another way that Google can see your web traffic, and where it is coming from? I need to understand this better.
You can tell if your coder is utilizing this service (and handing Google the keys to your business data) by inspecting the source code of your web page, looking for something like (the “XXX” partwill vary):
<script src=“http://www.google.com/XXX”></script>
This is definitely a helpful thing for developers — it makes their job easier, and we know developers love things that make their jobs easier. Google presents it that way to developers:
The AJAX Libraries API takes the pain out of developing mashups in JavaScript while using a collection of libraries. We take the pain out of hosting the libraries, correctly setting cache headers, staying up to date with the most recent bug fixes, etc.
Google is indeed hosting the libraries, but Google is also helping the makers of those libraries, since having your library hosted and distributed (and promoted) by Google can’t be a bad thing:
Google works directly with the key stake holders for each library effort and accepts the latest stable versions as they are released. Once we host a release of a given library, we are committed to hosting that release indefinitely.
This all sounds so… good. Google does try to suggest that this is also good for web publishers, when it states:
By using the Google AJAX API Loader’s google.load() method, your application has high speed, globaly available access to a growing list of the most popular, open source JavaScript libraries
I questioned the “load faster” part, because I prefer to rely on my own servers (thank-you-very-much). Alex noted below that load times can be reduced due to paralel loading of libraries from different servers, in addition to any benefits from Google’s caching and data center performance.
I doubt many business decision makers are actually in tune with this at all. Is it an issue? Developers are making the call here. So why is Google being so benevolent?
Brian notes in a comment that Google can trust the js libraries since it hosts them… and doesn’t need to crawl through them to know what’s inside. Excellent point. What do you think?
Take a look at that SWFObject one, too. Wow.. why would Google want to host in real time the javascript library that is most commonly used for managing embedded Flash objects with alternative text annotations?
Does anyone know? Please comment.
Google’s done covert things before. I recall when we learned, well after the fact, that Mozilla had taken nearly a hundred million of dollars from Google in exchange for exclusive access to its user base’s activity data. Even while we Mozilla supporters were pitched on the benevolent, non-profit status of the open source Mozilla project, the managers of Mozilla were operating as a for-profit company in partnership with Google. They even had to put off filing their taxes, so they could restructure as a for-profit entity nearly 18 months back, to avoid IRS penalties.
What do you think? Is covert user tracking enough of a benefit for Google to offer this program? Is the knowledge Google gain about the relative usage of these libraries so valuable (e.g. how many sites are loading jQuery vs. how many use Prototype)” What am I missing? Please comment if you know.
Q: Could it be that Google is getting code inserted into the AJAX libraries it is hosting, much like it got access to Mozilla’s userbase’s activity stream?
That would see so evil, since user interface libraries can do just about anything with the page they load in (your page, by the way). They can manipulate the page, or even track mouse movements without waiting for the user to click. Google could know if you hover on ads and don’t click, for example.
I’m not asking for anti-Google tin foil hat conspiracy theories… I just need helpful, honest analysis that will help answer the question - Why is Google hosting the common Javascript libraries (javascript APIs) for free?