Alex Rivera | Logout

Should I link to Google API's cloud for JS libraries?

Asked 2009-06-01T19:41:03.757
30

I'm looking for the pros/cons of pulling jQuery & other JS libraries from Google API's cloud as opposed to downloading files and deploying directly.

What say you?


My decision

The likelihood of the lib already cached on the users system is the overriding factor for me, so I'm going with a permalink to googleapis.com (e.g. ajax.googleapis.com/ajax/libs/…). I agree with others here that loss of access to the Google server cloud is a minimal concern.

Edit
Report

1 Answer

2

The pros are quite obvious and are in the other answers :

  • you save bandwidth
  • google is probably more reliable than your server
  • probably cached in most browsers (anyone stats on this ?)

But the cons can be very tricky :

  • If you are using https, you will get an error on most browsers as your certificate isn't valid for google's domain, only yours. This is a major issue for https.
answered 2010-02-09T14:39:23.367

Your Answer