在线页面访问速度测试工具_性能工具带:页面速度

在线页面访问速度测试工具

在线页面访问速度测试工具

Like it’s older brother YSlow, Page Speed, released by Google in in mid-2009, is primarily a tool to audit and analyze the performance of your site. However a closer looks shows that there is in fact a lot more that Page Speed can do.

就像哥哥YSlow一样,Google于2009年中期发布了Page Speed ,它主要是一种用于审核和分析网站性能的工具。 但是,仔细观察表明,实际上Page Speed可以做的还很多。

它测试什么 (What Does It Test)

Page Speed analyzes the performance of a page based on a set of 26 rules (as of version 1.7) that Google has documented. Each rule is given a priority code based on how great the potential impact would be on the page load time. Once Page Speed has determined which rules are broken, it gives the page a score between 0 and 100, which can be exported in JSON format, or sent straight to ShowSlow.com - a tool for recording YSlow and Page Speed scores over time.

Page Speed根据Google已记录的26条规则(从1.7版开始)分析页面的性能。 根据对页面加载时间的潜在影响有多大,给每个规则一个优先级代码。 一旦Page Speed确定了违反了哪些规则,它就会为页面提供介于0到100之间的分数,该分数可以JSON格式导出,也可以直接发送到ShowSlow.com (这是一个记录YSlow和Page Speed随时间变化的分数的工具)。

The rules range from common rules like optimize your images, to lesser known techniques like defining a character set early. A complete list of the rules Page Speed checks for is below:

规则的范围从优化图像的通用规则到鲜为人知的技术(如早期定义字符集)。 以下是Page Speed检查的规则的完整列表:

  1. Combine external CSS

    结合外部CSS

  2. Minimize DNS lookups

    最小化DNS查找

  3. Leverage browser caching

    利用浏览器缓存

  4. Remove unused CSS

    删除未使用CSS

  5. Leverage proxy caching

    利用代理缓存

  6. Minify CSS

    缩小CSS

  7. Minify HTML

    缩小HTML

  8. Minify Javascript

    缩小JavaScript

  9. Specify image dimensions

    指定图像尺寸

  10. Serve static content from a cookieless domain

    提供来自无cookie域的静态内容

  11. Use efficient CSS selectors

    使用高效CSS选择器

  12. Avoid bad requests

    避免不好的要求

  13. Combine external JavaScript

    结合外部JavaScript

  14. Enable compression

    启用压缩

  15. Minimize redirects

    最小化重定向

  16. Minimize request size

    最小化请求大小

  17. Optimize images

    优化图像

  18. Optimize the order of styles and scripts

    优化样式和脚本的顺序

  19. Put CSS in the document head

    将CSS放入文档头

  20. Serve resources from a consistent URL

    通过一致的URL提供资源

  21. Serve scaled images

    服务缩放的图像

  22. Specify a character set early

    尽早指定字符集

  23. Avoid CSS expressions

    避免CSS表达式

  24. Defer loading of JavaScript

    推迟加载JavaScript

  25. Parallelize downloads across hostnames

    跨主机名并行下载

  26. Specify a cache validator

    指定缓存验证器

还能做什么 (What Else Can It Do)

Like I said, while auditing may be the most well known feature of Page Speed, it is far from being the extent of its capabilities. In addition to performing a basic audit of your page, Page Speed automatically optimizes the Javascript files, CSS files, and images that it finds on the page, and saves them to a folder on your computer (which you can specify). It also has the ability to profile deferred Javascript files - something it does not do by default.

就像我说过的那样,尽管审核可能是Page Speed最为人所知的功能,但它远非其功能范围。 除了对页面进行基本审核之外,Page Speed还可以自动优化页面上找到的Javascript文件,CSS文件和图像,并将它们保存到计算机上的文件夹(可以指定)中。 它还具有分析延迟的Javascript文件的功能-默认情况下不执行此操作。

Perhaps the most fun though comes when you use the Page Speed Activity panel. At it’s most basic usage, the activity panel lets you record a timeline of all the browser activities, including both network activity and Javascript processing, that take place during the time you choose to record. That means that you get detail like how much time was spent connecting to the server, and how much time was spent executing the Javascript.

当您使用“页面速度活动”面板时,也许最有趣的是。 在最基本的用法下,活动面板可让您记录所有浏览器活动的时间表,包括在您选择记录的时间内发生的网络活动和Javascript处理。 这意味着您可以获得详细信息,例如花费了多少时间连接到服务器,以及花费了多少时间执行Javascript。

The activity panel also allows you to see a list of all the Javascript functions that were instantiated, but not called, during the recording period. This information could help you determine what portions of your code are not necessary immediately so that you can choose to load them later, allowing you to further improve your load time. You can also record “paint snapshots” in the activity panel which highlight each element in a page as it is rendered.

通过活动面板,您还可以查看在记录期间已实例化但未调用的所有Javascript函数的列表。 此信息可以帮助您确定不需要立即哪些代码部分,以便您以后选择加载它们,从而可以进一步缩短加载时间。 您还可以在活动面板中记录“绘制快照”,突出显示页面中呈现的每个元素。

While the advanced features offered by the activity panel are very useful, it’s important to keep in mind that they do slow down the Page Speed plugin a little. Since they add a little bit more overhead, the timeline will not be 100% accurate and will serve you better as a relative reference than an exact approximation of the time it takes your page to load.

虽然活动面板提供的高级功能非常有用,但请务必记住,它们确实会使Page Speed插件稍慢一些。 由于它们会增加一些额外的开销,因此时间轴将不会100%准确,并且相对于页面加载时间的精确估算,时间轴将更好地为您提供相对参考。

它也是开源的! (It’s Open Source Too!)

Just recently, the Page Speed SDK was released as open source. Already, Steve Souders has demonstrated the usefulness of this by building HAR to Page Speed - a tool that will apply the Page Speed rules to a HAR (HTTP Archive specification - a format gaining popularity) file you upload.

就在最近, Page Speed SDK作为开源发布。 史蒂夫·索德斯(Steve Souders)已经通过将HAR构建到Page Speed (一种将页面速度规则应用于您上载的HAR(HTTP存档规范-一种日益流行的格式)文件的工具)中,证明了此功能的实用性。

By opening the SDK up to open source, the potential is there for developers to build cross-platform tools that would allow people to analyze the performance of their site according to the Page Speed rules, regardless of the browser in use. It’s going to be exciting to see what other tools get built around the SDK as it continues to evolve.

通过将SDK开放给开源,开发人员就有可能构建跨平台的工具,无论使用什么浏览器,人们都可以根据Page Speed规则来分析网站的性能。 随着SDK的不断发展,看到围绕它开发了哪些其他工具将令人兴奋。

翻译自: https://timkadlec.com/2010/05/performance-toolbelt-page-speed/

在线页面访问速度测试工具

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值