0Pricing
Web Performance Optimization & Lighthouse · 课时

Google Lighthouse 入门

了解 Google Lighthouse 的功能,以及它如何帮助发现性能瓶颈和违反最佳实践的问题。

Google Lighthouse 入门 是 CoddyKit 上的免费 Web Performance Optimization & Lighthouse 课时。 这是第 1 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Web Performance Optimization & Lighthouse 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Web Performance Optimization & Lighthouse 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

What is Google Lighthouse?

Welcome to the world of web performance! Our first stop is Google Lighthouse. It's an open-source, automated tool designed to improve the quality of your web pages.

Think of it as your personal web auditor, giving you insights and recommendations to make your site better.

Why Use Lighthouse?

Why is Lighthouse so important?

  • Identify Issues: It helps you find common problems that slow down your website or hinder user experience.
  • Actionable Advice: Instead of just pointing out issues, it provides clear, practical advice on how to fix them.
  • Improve Quality: By following its recommendations, you can enhance performance, accessibility, SEO, and more.

The 5 Core Audits

Lighthouse performs audits across five key categories to give you a comprehensive overview of your web page's quality:

  • Performance: How fast your page loads and responds.
  • Accessibility: How easily users with disabilities can interact with your page.
  • Best Practices: Ensures your site follows modern web development standards.
  • SEO: Checks for common search engine optimization issues.
  • Progressive Web App (PWA): Assesses if your site meets PWA criteria for a reliable, fast, and engaging experience.

How Lighthouse Audits Work

When you run an audit, Lighthouse simulates a user visiting your page. It does this in a controlled environment to ensure consistent results.

It then runs a series of tests, collects performance metrics, and analyzes the page's structure and content against best practices. Finally, it compiles all this into an easy-to-understand report.

Where to Run Lighthouse

The easiest and most common way to run Lighthouse is directly within your web browser, specifically in Google Chrome's Developer Tools (often called DevTools).

It's built right in, so there's no installation needed to get started!

Your First Audit: DevTools Steps

Ready to try it out? Here's how you'd typically run an audit in Chrome DevTools:

  1. Open your website in Chrome.
  2. Right-click anywhere on the page and select 'Inspect' (or use F12 / Cmd+Option+I).
  3. Go to the 'Lighthouse' tab within DevTools.
  4. Select the categories you want to audit (e.g., Performance, SEO).
  5. Click 'Analyze page load'.

Lighthouse will then run its tests and generate a report for you!

Understanding the Report

Once the audit is complete, Lighthouse presents a detailed report. At the top, you'll see a score for each category (Performance, Accessibility, etc.) from 0 to 100.

A higher score means better quality in that area. Below the scores, you'll find sections like 'Opportunities' and 'Diagnostics', which provide specific recommendations.

Focus on Performance Score

While all categories are important, the Performance score is often the first thing people look at. It's a combined score based on several key metrics that measure how quickly and smoothly your page loads and becomes interactive.

Aim for scores above 90 for a great user experience!

Actionable Insights

The real power of Lighthouse lies in its actionable recommendations. For each issue identified, it suggests specific improvements you can make.

For example, if your images are too large, Lighthouse might suggest 'Serve images in next-gen formats' or 'Efficiently encode images'. These insights guide your optimization efforts.

Lighthouse Categories

Which of the following are among the five core audit categories Google Lighthouse evaluates for a web page?

Recap: Intro to Lighthouse

Great job! You've just been introduced to Google Lighthouse, a powerful tool for analyzing and improving your web pages.

We learned that Lighthouse audits Performance, Accessibility, Best Practices, SEO, and PWA, providing actionable advice. The easiest way to run it is directly in Chrome DevTools. Next, we'll dive deeper into running your first audit and understanding the scoring system!

常见问题解答

「Google Lighthouse 入门」课时是免费的吗?

是的 — 「Google Lighthouse 入门」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Web Performance Optimization & Lighthouse 课程的其余内容,请升级到 CoddyKit PRO。 Web Performance Optimization & Lighthouse 课程共包含 4 节课。

「Google Lighthouse 入门」这节课中我会学到什么?

了解 Google Lighthouse 的功能,以及它如何帮助发现性能瓶颈和违反最佳实践的问题。 你通过在浏览器中直接运行的动手代码来练习 Web Performance Optimization & Lighthouse,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Web Performance Optimization & Lighthouse 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Web Performance Optimization & Lighthouse 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 1 节课,共 4 节。

「Google Lighthouse 入门」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Web Performance Optimization & Lighthouse 课中编写并运行代码吗?

能。每节 Web Performance Optimization & Lighthouse 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. Google Lighthouse 入门
  2. 运行您的首次审计
  3. 解读 Lighthouse 报告
  4. 了解 Lighthouse 评分
← 返回 Web Performance Optimization & Lighthouse