10

Many popular JS/CSS frameworks are offered via Google's Libraries API (jQuery, Dojo, MooTools etc.). Yahoo also hosts it's own YUI toolkit, as do many others.

Do any high volume/traffic sites actually rely on these externally-hosted resources (without hosting their own copies)? It seems like a great service to leverage, although in my experience I've often encountered these libraries packaged along with the projects I've worked on.

What's the most common practice here? Moreover, is it safe and reliable (based on experience) to use these externally?

12

It is quite common, and for high traffic websites certainly using a Content Delivery Network is sound advice, it takes the strain off your main server whilst making sure users get static content quickly.

There is the added benefit that if I visit site A that uses say the Google hosted jQuery and then visit site B that does the same, I will have cached it from site a and will not need to download it again.

The downside is that you are relying on other networks having the same uptime you do, the Amazon outages have proved that nothing has 100% uptime.

4
  • Thanks Toby, I certainly appreciate CDNs although I always thought of them as being setup and configured by said company itself.. rather than a completely external system. The caching point you made is also nice! Cheers
    – jlb
    Nov 4 '11 at 10:19
  • There is a difference between a CDN that you set up yourself for your own files and something like how Google serves certain files, but in my opinion the drawbacks and advantages are the same. I guess there is a chance that one outside of your control could change the content of the hosted file, but I am not sure I have ever found an example of this.
    – Toby
    Nov 4 '11 at 10:33
  • 2
    Using a different host for your js/css/images also allows the browser to issue more parallel requests, meaning potentially faster page loads. Nov 4 '11 at 13:55
  • The problem with jQuery is that there are a lot of versions recently, so many sites will have different versions from 1.5, 1.5.1 up to 1.7. Nov 4 '11 at 18:03
5

Check BuiltWith.com's Web Technology Trends & HTTPArchive website's stats for metrics on usage of external libraries & services.

As per BuiltWith.com, 2,146,587 websites use Google's AJAX Libraries API. This includes 169,454 websites within the most visited sites on the internet and an additional 1,977,133 websites on the rest of the web.

According to HTTPArchive.org, 17% of Alexa Top 1,000,000 Sites(?) use Google Libraries API

Decreased latency, increased parallelism & better caching are some benefits of using popular libraries offered by reliable providers.

There are ways to manage failover in case of service outage.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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