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?
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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With