Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 12 down vote accepted

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.

share|improve this answer
    
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. –  Zhaph - Ben Duguid 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. –  DisgruntledGoat Nov 4 '11 at 18:03
add comment

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.

share|improve this answer
    
Thanks for the stats @mvark –  jlb Nov 5 '11 at 8:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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