已加载Google的JQuery缓存版本的浏览器的百分比是多少? [英] What percentage of browsers have Google's cached version of JQuery already loaded?

查看:114
本文介绍了已加载Google的JQuery缓存版本的浏览器的百分比是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能有百分之几的浏览器已经加载了Google的JQuery缓存版本?

我要这是要弄清楚我的页面在平均"浏览器上的加载速度.我的页面需要JQuery和JQuery UI.我相信大多数浏览器可能已经从Google的服务器中缓存了JQuery.这是真的?以及JQuery UI的数字是什么?

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.

此外,对于Jquery UI: Google的Jquery UI有哪些组件?是全部还是全部(排序等)?

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

此外,我认为它约为180 kb.我应该使用它还是应该在jqueryui.com上创建一个较小的custom.ui.min?

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?

推荐答案

根据最佳做法加快网站速度:

减少HTTP请求的数量 您页面中的内容就是开始的地方. 这是最重要的准则 首先提高性能 时间的访客.如Tenni中所述 Theurer的博客文章浏览器缓存使用率-公开!每天的40-60% 您网站的访问者带来了一个 空缓存.使您的页面快速 这些首次访问者是 更好的用户体验.

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.

这很重要,因为对于40-60%的每日访问者而言,无论从何处加载jQuery库都没有关系,他们不会将其存储在缓存中.

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.

我还认为,问题的实质还在于访问者将其缓存的频率.您是否要依赖一个不受您控制的外部公司,甚至与Google一样大?如果Google倒闭(发生了该怎么办)怎么办?如果Google在您长时间休假时突然决定停止托管jQuery,该怎么办?如果Google员工犯了一个错误并用新版jQuery覆盖了您指定的版本,该新版jQuery破坏了您页面上的功能,怎么办?

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?

这篇关于已加载Google的JQuery缓存版本的浏览器的百分比是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆