We combine and minify our JS with Minify - the combined JS is then cached on Akamai. I'm suggesting to my supervisor that we put JQuery and JQueryUI on Google CDN and take it out of our combined JS.

The benefits I see are parallel downloads, significantly smaller Akamai cache hit, and the high potential the user will have JQuery from Google CDN cached in his/her browser when he/she visits our site so no download will be required at all. I also pointed out how pointing to the major version CDN URL //ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js will eliminate the need for us to micro-manage our JQuery version control, and that if a new release introduces a bug, we simply point the CDN URL to a stable minor version of our choice until the issue is resolved.

My supervisor disagrees and thinks keeping it on Akamai is the way to go.

Any insight as to which is going to be faster here? I looked for some benchmarks and references online but they are either out-dated or merely talk about Google wanting to acquire Akamai.

EDIT: Some further research has pointed me to an article mentioning how 'latest version' CDN URL's use short expires headers so it might be more optimal to use /jquery/1.7/. I'm fine with this - the general question still remains.

  • I think it is best to go with an approach where you have control and manage your jquery dependencies rather than finding unexpected bugs. The benefit of control over speed for user experience is really a big one. Just my 2 cents.
    – r0ast3d
    Commented Nov 10, 2011 at 19:37
  • 1
    I trust the JQuery team more than I trust my co-workers when it comes to keeping bugs out of our code base.
    – AlienWebguy
    Commented Nov 10, 2011 at 19:38
  • true, that is more the reason to have your code safely working with a known version that you have tried and tested.
    – r0ast3d
    Commented Nov 10, 2011 at 19:39
  • You're missing the point and your comments have nothing to do with the question itself. I need to know which is faster and more optimal for the user.
    – AlienWebguy
    Commented Nov 10, 2011 at 19:42
  • 1
    Hope this helps blog.mudy.info/tag/cdn-comparison
    – r0ast3d
    Commented Nov 10, 2011 at 19:47

1 Answer 1


Why not split it out and leave it on Akamai?

Moving to jQuery / jQuery UI on Google is going to bring in the overhead of a DNS lookup for Google, TCP slow-start (although Google 'cheat' at this with a higher initial congestion window)

Are jQuery / jQuery UI a single file on the Google CDN or multiple ones - in which case there's the latency of the extra requests?

Based on something I read (which I can't find now) apparently the odds of finding a matching version of jQuery in the browser cache is lower than expected - mainly due to all the different version numbers in use and the limited size of browser caches.

Could you do some A/B testing, say push 10% traffic down the Google CDN route and measure real-user page load times?

Edit: Here's a post that looks at the versions of jQuery in use from Google's CDN and comes to the conclusion that using jQuery from Google's CDN isn't likely to benefit your first-time visitors much - http://statichtml.com/2011/google-ajax-libraries-caching.html

Your Answer

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

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