Steve Souders, performance architect at Yahoo, announced today the public release of YSlow.
雅虎(Yahoo)的性能架构师Steve Souders 今天宣布了YSlow的公开发布。
什么是YSlow? (What's YSlow?)
It's an extension to Firebug (yes, correct, Firebug, not Firefox) that helps with performance optimization efforts. It scores your page on the scale A to F, based on compliance with Yahoo's performance rules. It's a tool that has been used internally at Yahoo and is now released to the world.
它是Firebug(是,正确,Firebug,不是Firefox)的扩展,可帮助优化性能。 它会根据对Yahoo的效果规则的遵守情况,以A到F的等级对您的网页进行评分。 它是Yahoo内部使用的一种工具,现已发布给全世界。
分数 (The score)
Here's how YSlow scores Yahoo's homepage, gives it an A with 93 points out of 100
这是YSlow为Yahoo的首页评分的方式,它在100分中的93分中获得了A
You can see on the screenshot how YSlow is just another panel within Firebug, and when you select the panel it gives you a few features. The main one is Performance (shown on the screenshot).
您可以在屏幕截图上看到YSlow仅仅是Firebug中的另一个面板,当您选择该面板时,它会提供一些功能。 主要的是性能(如屏幕截图所示)。
You get a list of 13 things YSlow has evaluated (they are based on the performance rule) and if you don't get an A, there is an arrow that gives you more explanations why. Every one of the 13 items on the list is linked to online documentation of the rule so you can figure out right then what could be improved.
您会得到YSlow评估过的13项内容的列表(它们是基于性能规则的),如果您未获得A值,则会出现一个箭头,向您详细说明原因。 列表中的13个项目中的每个项目都与该规则的在线文档链接,因此您可以立即找出可以改进的地方。
其他特性 (Other features)
Besides Performance, there's also the Stats tab which gives you comparison of how your page size for visitors coming with an empty cache vs the ones that have previously visited the page.
除了“性能”外,还有“统计信息”标签,该标签可让您比较访问带有空缓存的访问者与之前访问过页面的访问者的页面大小。
The other tab is Components which lists every component on the page along with some information, relevant to performance, such as if the component as gzipped, what was the ETag if any, component size and expiration date.
另一个选项卡是“组件”,它列出了页面上的每个组件以及一些与性能相关的信息,例如,该组件是否已压缩,ETag是什么(如果有),组件大小和有效期。
In the tools section you'll find a nice surprise - integration with the JSLint tool, the unforgiving JavaScript verifier by Douglas Crockford.
在“工具”部分中,您会发现一个不错的惊喜-与JSLint工具集成,Douglas Crockford编写了令人难以置信JavaScript验证程序。
分数(重访) (The score (revisited))
OK, I'm sure you'll find the tool invaluable, but you may frown upon the score. Well, the scoring system is made so that it suits Yahoo's purposes, but you can modify it so that it fits your specific needs. In order to customize the points system you can go about:config in Firebug and search for yslow. There you can specify points for the score. In addition to that you can find the file called yslowcontext.js in your Firefox extensions folder (should be somewhere in Documents and Settings/Application Data/Mozilla/extensions/[email protected]/, path abbreviated), if you can't find it, just search for it. In this file, there is an array that defines the weight of each of the 13 rules in the overall score, so you can tweak that as well. To find the array, search for lintweights
好的,我敢肯定您会发现该工具非常宝贵,但是您可能会不满意得分。 好吧,计分系统的制作使其适合Yahoo的目的,但是您可以对其进行修改,使其适合您的特定需求。 为了自定义积分系统,您可以在Firebug中进行about:config并搜索yslow。 您可以在此处指定分数。 除此之外,如果找不到,可以在Firefox扩展文件夹中找到名为yslowcontext.js文件(应位于“文档和设置/应用程序数据/ Mozilla / extensions / steve @ yahoo /”中的某个位置,缩写路径)。 ,只需搜索即可。 在此文件中,有一个数组定义了总分中13条规则的权重,因此您也可以对其进行调整。 要找到该数组,请搜索lintweights
玩得开心! (Have fun!)
And happy performance tunning!
和开心的表演调音!
链接 (Links)
Tell your friends about this post on Facebook and Twitter
在Facebook和Twitter上告诉您的朋友有关此帖子的信息
翻译自: https://www.phpied.com/yslow-performance-extension-for-firebug/