Chrome对网页性能的检测--2015-05-05总结

简介: Chrome浏览器非常强大,使用Chrome浏览器对页面性能进行检测,根据测试的结果进行优化。当然这个结果只是参考,在实际的项目中肯定有特殊情况存在,并不能为了满足某项测试结果而忽略特定情况的存在。

Chrome浏览器非常强大,使用Chrome浏览器对页面性能进行检测,根据测试的结果进行优化。当然这个结果只是参考,在实际的项目中肯定有特殊情况存在,并不能为了满足某项测试结果而忽略特定情况的存在。

1、Chrome检测工具

F12之后点击Audits然后出现了如下界面,选中重载页面开始检测按钮,然后点击Run按钮,之后就是等待结果。


2、检测结果

这个检测结果分为2类,一个是网络,一个是网页性能;

检测结果不仅列出了问题,还定位问题在哪里,可以很快入手解决对应的问题。
问题一:总共有29个可以压缩的JS文件

  1. 合并JS文件:Combine external JavaScript
  2. There are multiple resources served from same domain. Consider combining them into as few files as possible.一个域名有多个文件,可以考虑将他们压缩为尽可能少的文件。

  3. 启用gzip压缩:Enable gzip compression
  4. Compressing the following resources with gzip could reduce their transfer size by about two thirds (~715 B).启用gzip压缩降低传输大小。

  5. 浏览器缓存:Leverage browser caching 
  6. The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers。资源没有指定过期时间,浏览器可能不会缓存。

  7. 代理缓存:Leverage proxy caching (38) ?
  8. Resources with a "?" in the URL are not cached by most proxy caching servers:

  9. Minimize cookie size
  10. The average cookie size for all requests on this page is 36 B

  11. Serve static content from a cookieless domain (35)
  12. 12.8 KB of cookies were sent with the following static resources. Serve these static resources from a domain that does not set cookies:

  13. Specify image dimensions (10)
  14. A width and height should be specified for all images in order to speed up page display. The following image(s) are missing a width and/or height:

网页性能部分
  1. 1、优化样式和脚本的顺序:Optimize the order of styles and scripts (4)
    1. The following external CSS files were included after an external JavaScript file in the document head. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript.

  1. 2、把CSS放到head中:Put CSS in the document head (3)
  2. CSS in the document body adversely impacts rendering performance.
  3. 3、删除没用的CSS:Remove unused CSS rules (44)
    1. 44 rules (19%) of CSS not used by the current page.
  4、Use normal CSS property names instead of vendor-prefixed ones (3)





目录
相关文章
|
2月前
|
Web App开发 人工智能 自然语言处理
快速搞定Dify+Chrome MCP:打造能操作网页的AI助手
用Dify+Chrome MCP,3分钟打造能“动手”操作网页的AI助手!无需编程,通过自然语言指令实现自动填表、数据抓取、网页点击等自动化任务。本地部署简单,支持搜索、登录、监控等场景,让AI成为你的7×24小时数字员工,高效处理重复性网页工作。
|
2月前
|
Web App开发 人工智能 自然语言处理
快速掌握Dify+Chrome MCP:打造网页操控AI助手
本文教你如何快速搭建一个能操作浏览器的AI助手:通过Dify和Chrome MCP结合,只需三步配置,即可实现自动填表、数据抓取和网页操控,无需编写代码,用自然语言就能指挥AI完成各类网页任务。
|
2月前
|
Web App开发 人工智能 自然语言处理
快速搞定Dify+Chrome MCP:打造能操作网页的AI助手
本文介绍了如何通过Dify和Chrome MCP在3分钟内打造一个能操作浏览器的AI助手。结合Dify的LLM能力与Chrome MCP的浏览器控制功能,用户可用自然语言指令让AI自动填写表单、抓取数据、点击按钮,实现网页自动化操作。无需复杂编程,适合本地部署,可应用于数据监控、内容抓取等多种场景。
|
12月前
|
Web App开发 人工智能 自然语言处理
WebChat:开源的网页内容增强问答 AI 助手,基于 Chrome 扩展的最佳实践开发,支持自定义 API 和本地大模型
WebChat 是一个基于 Chrome 扩展开发的 AI 助手,能够帮助用户理解和分析当前网页的内容,支持自定义 API 和本地大模型。
924 1
|
Web App开发 JavaScript 前端开发
使用 Chrome 浏览器的内存分析工具来检测 JavaScript 中的内存泄漏
【10月更文挑战第25天】利用 Chrome 浏览器的内存分析工具,可以较为准确地检测 JavaScript 中的内存泄漏问题,并帮助我们找出潜在的泄漏点,以便采取相应的解决措施。
1359 9
|
Web App开发 开发者
|
Web App开发 SQL 前端开发
性能工具之前端分析工Chrome Developer Tools性能标签
【2月更文挑战第22天】性能工具之前端分析工Chrome Developer Tools性能标签
200 1
性能工具之前端分析工Chrome Developer Tools性能标签
|
Web App开发 缓存 监控
如何使用 Chrome DevTools 进行网页性能优化?
如何使用 Chrome DevTools 进行网页性能优化?
|
Web App开发 前端开发 JavaScript
【专栏:工具与技巧篇】网页调试工具(Chrome DevTools)的使用
【4月更文挑战第30天】Chrome DevTools是谷歌浏览器内置的网页调试利器,提供Elements(查看编辑HTML/CSS)、Console(JavaScript调试)、Sources(JS/CSS文件调试)、Network(网络请求分析)和Performance(性能瓶颈排查)等面板。通过掌握这些功能,开发者能有效优化网页性能和用户体验。本文详细介绍了各面板的使用方法,助力开发者高效工作。
1126 1
|
Web App开发 定位技术
Chrome中实现使用迅雷一次性选中并下载网页内全部链接的方法
Chrome中实现使用迅雷一次性选中并下载网页内全部链接的方法
396 1