Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am wondering over the dangers / difficulties in using external services like Google Chart in my production state website.

With external services I mean them that you can't download and host on your own server.

(-) Potentially the Google service can be down when my site is up.

(+) I don't have to develop those particular systems for new browser technologies, hopefully Google will do that for me.

(-) Extra latency while my site fetch the data from the google servers.

What else? Is it worth spending time and money to develop my own systems to be more in control of things?

share|improve this question

migrated from stackoverflow.com Jun 20 '11 at 21:49

This question came from our site for professional and enthusiast programmers.

This is an open-ended question, with no right or wrong answer. As such, it is not suitable for stackoverflow. You may wish to try the Programmers site. – George Cummins Jun 20 '11 at 13:37
You are probably right, somehow it's these open-ended questions that I need help with :) There are however rights and wrongs, but only in specific cases - no general solution. – Mattis Jun 20 '11 at 13:42
@Mattis Please review my edit and rollback if you were in fact talking about externally-hosted static library files. – meagar Jun 20 '11 at 15:28
@meagar I'm not really sure what the difference are, both descriptions sounds like what I mean :) I'll let the changes stand. – Mattis Jun 20 '11 at 21:48
up vote 6 down vote accepted

CDN Plug: Talking of CDN's Please use CDN-js to load your common JavaScript libraries.

Extra latency while my site fetch the data from the google servers.

This is not the case. The latency between a client (browser) fetching the google chart library from your server and the google server is the same.

Also hosting it on one CDN (i.e. google) increases the chances that the library is already cached and that the load is instant.

(-) Potentially the Google service can be down when my site is up.

Extremely small chance of this occurring but is a threat.

Google charts spefically can not be used locally.

Most other libraries used from a CDN can have a fallback for when they go down.

Fallback technique if CDN is down

Just plug in your own feature detection for whether google charts is loaded.

Actual Downsides:

The main downsides for using external tools is that they are not as flexible. They can do a lot of work for you though.

It also depends on how skilled you are at writing your own tools and how well you want to integrate them into the rest of your website infrastructure and general styling / look and feel.


If you do not need to integrate the functionality with other parts of the website nor do you need to style it heavily to make it look integrated with the rest of your website then use google charts (or g.Raphael).

If you do not have the skills to write your own library that achieves similar functionality then use a library.

share|improve this answer
I don't think you can fallback with google charts. They apparently don't work offline. – kingjiv Jun 20 '11 at 13:45
@kingjiv thanks for pointing that out. – Raynos Jun 20 '11 at 13:50
Thanks Raynos, I actually didn't know about CDNs for libraries, I will start using them. I have to start planning for a CDN of my own soon anyways... :) – Mattis Jun 20 '11 at 21:49
@Mattis it doesn't work that way. CDNs get more useful as more people use them. The more people use the bigger the chance is that it's cached. And you care about the free caching, that's why the google cdn is good because it's widely used. You can use cdnjs for anything google won't server. – Raynos Jun 20 '11 at 21:51

1) As far as uptimes go, Google is one of the best. I wouldn't be too worried about referencing external libraries that exist on Google servers, as if they go down there is going to be a large % of the web that is currently missing their references.

2) If you think you have time to develop all these third party applications and embed them in your site and have them give the same quality experience that pre-existing ones give, then you're mistaken. There are teams of people that work on these different libraries for extended periods of time and then put in additional work to maintain them. You should definitely utilize the hard work that others are willing to give you when building websites.

3) The extra latency will only occur the first time you try to load an external resource (unless the resource changes in the middle of your session). It will be cached locally upon being fetched and therefore will not require an external call to retrieve subsequently.

I would say utilize as much of the awesome external libraries out there as you want to. If they are on secure CDNs (such as Google's) then you will mitigate the risk you take (which is already minimal).

share|improve this answer

It really depends on your specific situation. Generally something like a chart is not absolutely critical and if it's down for a few hours it's not the end of the world. Google's uptime is really good so it's not likely to be down often. You really just have to weigh the risks and benefits for your specific situation.

share|improve this answer

If Google services go down so does a lot of websites (or at least their functionality). This question needs to be discussed openly with whoever is paying for the system, since development costs to replace some of the free Google functionality can be very high. The risks are small and as pointed out in another reply, the latency is not a factor - probably the other way around many times.

share|improve this answer

Your Answer


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.