Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What percentage of browsers have Google's cached version of JQuery already loaded?

What percentage of browsers would probably have Google's cached version of JQuery already loaded?

I am asking this to figure out how fast my page would load on an "average" browser. My page needs both JQuery and JQuery UI. I believe most browsers would probably have JQuery already cached from Google's servers. Is this true? And what are the numbers for JQuery UI?

Any proof of your claim would be helpful.

Also, for Jquery UI: What components does Google's Jquery UI have? Does it have all of them or just a few (sortable, etc...)?

Also, I think it's about 180 kb. Should I use that or should I create a custom.ui.min at jqueryui.com that might be smaller?

like image 935
chris Avatar asked Aug 19 '09 22:08

chris


2 Answers

According to Best Practices for Speeding Up Your Web Site:

Reducing the number of HTTP requests in your page is the place to start. This is the most important guideline for improving performance for first time visitors. As described in Tenni Theurer's blog post Browser Cache Usage - Exposed!, 40-60% of daily visitors to your site come in with an empty cache. Making your page fast for these first time visitors is key to a better user experience.

This is relevant because for 40-60% of your daily visitors, it doesn't matter where you load the jQuery library from, they won't have it in their cache.

I also think there is more to the question then how often your visitors will have it cached. Do you want to take a dependency on an outside company you do not control, even one as large as Google? What if Google is down (it has happened)? What if Google suddenly decides to stop hosting jQuery while you are on an extended vacation? What if a Google employee makes a mistake and overwrites your specified version with a new version of jQuery that breaks functionality on your page?

like image 163
Grant Wagner Avatar answered Oct 07 '22 02:10

Grant Wagner


The only stats I've seen are ones from the research pingdom did in June last year.

It's difficult to extrapolate from that the percentage of browsers with a cached copy - it will probably vary considerably based on audience. For instance, stackoverflow uses Google's CDN, so 99.99%* of developers will have a cached copy of (currently) jquery 1.7.1 :).

*statistic made up on the spot

like image 22
Sam Avatar answered Oct 07 '22 03:10

Sam