9

As you know Google, Microsoft and jQuery.com offer JS files on their CDN. To do this, they must need to operate significant servers which must come at a cost to them. Why do they do this and what do they get from it?

2
  • 1
    How much does it cost Google or MS to operate their current network of server farms though? To what extent can outsourcing the hosting onto another company be cheaper than running it in addition to their current group of services?
    – JB King
    Aug 11, 2011 at 14:52
  • 1
    You have to factor in that they use their CDNs to host all their widely used files. This means that every file hosted splits the gross cost of having those servers making each file cost pennies on the dollar compared to the revenue they must recieve.
    – Jacksonkr
    Aug 20, 2011 at 18:46

9 Answers 9

16
  • Goodwill
  • Training ease for their products (tutorials don't fail because of misplaced file)
  • Net traffic analysis
4
  • Do you have any evidence for this?
    – blubb
    Aug 11, 2011 at 14:10
  • 4
    A CDN only works if everyone uses it. So they more people use google's / microsofts / etc CDN the more effective it is.
    – Raynos
    Aug 11, 2011 at 15:54
  • 3
    @Simon, I have absolutely no proof that any of my items are correct. I don't work for either company and haven't seen any public statements from either that would prove me correct. They're just guesses based on what makes sense to me.
    – Jason
    Aug 11, 2011 at 16:26
  • 1
    The traffic analysis thing is clever.
    – Xeon06
    Aug 11, 2011 at 17:16
9

Because many Microsoft or Google products use that resource, and they need a CDN for their own products. Since nearly every person is going to have downloaded that file from the CDN using their servers anyhow (and it's cached on that users computer until it expires) allowing other sites to use the CDN doesn't really cost them anything extra.

It fosters goodwill.

And as a slight bonus, if you get the file from another site prior to using the Microsoft or Google product that uses it, the loading of the Microsoft or Google product will be slightly faster since it's one less file to download.

0
5

My guess is to foster goodwill among developers, so that in the back of your mind you're more willing to use one of their platforms or tools to develop in the future. Since Google already /has/ an enormous scalable network infrastructure, it probably doesn't cost them a lot anyways.

3

JS files distributed in CDN is very heavily cached (i.e. unless you cleared your browser cache, they're practically download once and stays forever for any website that uses the same URL), and so it reduces the overall amount of Internet traffic. For Google or Microsoft, since many of their own popular products uses those javascript libraries anyway, the additional cost of hosting a CDN is probably minimal (how many people does not use any Google services at all?); and the social advantage is significant.

Installing a CDN-hosted jQuery library is slightly easier than installing it in your own server and in some circumstances it might be impossible to host your own files. jQuery.com obviously intends to promote their javascript library and more websites using jQuery means a step closer to world domination more plugins developers, more jQuery books sold, more donation, and more developers contributing to the library.

2
  • just curious: and in some circumstances it might be impossible to host your own files.....any specific examples? Aug 11, 2011 at 16:01
  • @balalakshmi: If you write a tutorial and want someone to be able to copy and paste a snippet of code (that references the CDN copy of a library) and just have it work.
    – Jeremy
    Aug 11, 2011 at 18:59
3

A number of answers here touch on the technical advantages of Google hosting the files, but they miss the reason as to why this is a benefit to Google. At the end of the day, Google would not choose to do something unless they benefit from it in some way (either directly or indirectly).

Google uses these files extensively across their network, and as such need to host them somewhere. By hosting them from a centralised location, the file will be downloaded once, and then will be cached in the users browser, so it does not have to be downloaded next time the user visits another Google site. By opening this up to other websites, those other websites also benefit from slightly quicker loading times, as the user probably already has them cached. This will come at very little overhead to Google, as in very few cases will the file actually need to be loaded again, but also because their CDN is so large and efficient.

Now, what is the benefit to Google of doing this?

Don't forget Google's primary source of revenue is from web advertising. Therefore, the more people browsing the web, the more money Google can make. As such, it is in Google's interest to make it as easy as possible for people to develop rich web applications and websites, and to make those applications load as fast as possible.

By hosting the file, they make it load faster via caching (as mentioned previously), but also make it easier for developers to access and use. It is now one less step for the developer, they no longer need to copy the file to their server and host it, and can instead just copy code from tutorial websites and have it up and running in seconds.

This makes jQuery very quick, and very easy to use, encouraging more people to use, and contribute to the project. As it is open source, as more people contribute, allowing Google to reduce their input in terms of developer resources.

So by hosting the files, Google has managed to:

  • Speed up websites
  • Make websites more feature rich and appealing
  • Help make jQuery an established technology, which can be maintained by an independent community

All this benefits Google by making the web a more friendly, faster place. All at minimum cost to Google, but significant extra revenue to them.

1

They do it because they perceive a business value in doing it. To know what specific business value, you'll have to ask them each individually.

1

As an addition to the arguments already presented (tracking, goodwill, and so on) I'd also add the argument of easier bugfixing.

If an application uses version X of library Y where a bug get's introduced and company Z is able to fix the bug and upload it to their CDN then everybody is happy. If the application is hosted locally, then the client has to ensure that the new version get's into their product. In the meantime, the might raise a support issue that has to be answered by company Z. This takes time and resources. If the error instead never actually manifests on the client side (becuase the library has already been updated) then there is a real business value for company Z: less time needed to support the product.

2
  • I'd say in most cases the client still has to ensure the new file gets to their local product. I think both Google and Microsoft allow you to specify which version you pull from the CDN. Aug 11, 2011 at 18:22
  • Yes they do - but that's not necessarily the case for every file hosted on a CDN. I've seen - and used - URLs like http://somewhere/file-2.Latest.js where you'll always get the latest build in the 2.x branch. Aug 12, 2011 at 14:04
1

Google makes money when people use the Internet. Their entire business model is to give users what they want quickly, so those same users will click on ad{sense, words, mob} advertising. If they host jQuery et al on their CDN, it makes it easier for everyone who builds content (probably with the aforementioned ads) to build it so that it responds quickly and looks good

-2

one small advantage of this is, that they have an overwiew on how much the Softare is used, and the could track users (Google eg can see users on other websites even if they don't have Google Analytics or Advertising, and you know: knowing the user gets you more Money (for personalized Ads ) ;-)).

2
  • the second part is blatantly wrong. If there is only one version, then there is an absoulte requirement for backwards-compatibility. Just image what happens to code that was written against the old API once the library in the one copy was updated.
    – blubb
    Aug 11, 2011 at 14:12
  • true, I had a big thinking-mistake
    – Tokk
    Aug 11, 2011 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.